Committing TBB 2019 Update 6 source code
authortbbdev <inteltbbdevelopers@intel.com>
Thu, 18 Apr 2019 11:14:08 +0000 (14:14 +0300)
committertbbdev <inteltbbdevelopers@intel.com>
Thu, 18 Apr 2019 11:14:08 +0000 (14:14 +0300)
800 files changed:
CHANGES
Doxyfile
Makefile
README.md
build/AIX.gcc.inc
build/AIX.inc
build/BSD.clang.inc
build/BSD.inc
build/FreeBSD.clang.inc
build/FreeBSD.gcc.inc
build/FreeBSD.inc
build/Makefile.rml
build/Makefile.tbb
build/Makefile.tbbmalloc
build/Makefile.tbbproxy
build/Makefile.test
build/OpenBSD.clang.inc
build/OpenBSD.inc
build/SunOS.gcc.inc
build/SunOS.inc
build/SunOS.suncc.inc
build/android.clang.inc
build/android.gcc.inc
build/android.icc.inc
build/android.inc
build/android.linux.inc
build/android.linux.launcher.sh
build/android.macos.inc
build/android.windows.inc
build/big_iron.inc
build/build.py
build/common.inc
build/common_rules.inc
build/detect.js
build/generate_tbbvars.bat
build/generate_tbbvars.sh
build/ios.clang.inc
build/ios.macos.inc
build/linux.clang.inc
build/linux.gcc.inc
build/linux.icc.inc
build/linux.inc
build/linux.pathcc.inc
build/linux.xl.inc
build/macos.clang.inc
build/macos.gcc.inc
build/macos.icc.inc
build/macos.inc
build/mic.icc.inc
build/mic.linux.inc
build/mic.linux.launcher.sh
build/mic.offload.inc
build/test_launcher.bat
build/test_launcher.sh
build/version_info_aix.sh
build/version_info_android.sh
build/version_info_linux.sh
build/version_info_macos.sh
build/version_info_sunos.sh
build/version_info_windows.js
build/windows.cl.inc
build/windows.gcc.inc
build/windows.icl.inc
build/windows.inc
cmake/TBBBuild.cmake
cmake/TBBGet.cmake
cmake/TBBInstallConfig.cmake
cmake/TBBMakeConfig.cmake
cmake/tbb_config_generator.cmake
cmake/tbb_config_installer.cmake
cmake/templates/TBBConfig.cmake.in
cmake/templates/TBBConfigInternal.cmake.in
cmake/templates/TBBConfigVersion.cmake.in
doc/Release_Notes.txt
examples/GettingStarted/sub_string_finder/Makefile
examples/GettingStarted/sub_string_finder/Makefile.windows
examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp
examples/Makefile
examples/common/copy_libraries.bat
examples/common/examples-common.inc
examples/common/gui/Makefile.gmake
examples/common/gui/Makefile.win
examples/common/gui/convideo.cpp
examples/common/gui/d2dvideo.cpp
examples/common/gui/dxcheck.bat
examples/common/gui/gdivideo.cpp
examples/common/gui/macvideo.cpp
examples/common/gui/video.h
examples/common/gui/winvideo.h
examples/common/gui/xcode/tbbExample/OpenGLView.h
examples/common/gui/xcode/tbbExample/OpenGLView.m
examples/common/gui/xcode/tbbExample/main.m
examples/common/gui/xcode/tbbExample/tbbAppDelegate.h
examples/common/gui/xcode/tbbExample/tbbAppDelegate.m
examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch
examples/common/gui/xvideo.cpp
examples/common/utility/fast_random.h
examples/common/utility/utility.h
examples/concurrent_hash_map/count_strings/Makefile
examples/concurrent_hash_map/count_strings/Makefile.windows
examples/concurrent_hash_map/count_strings/count_strings.cpp
examples/concurrent_priority_queue/shortpath/Makefile
examples/concurrent_priority_queue/shortpath/Makefile.windows
examples/concurrent_priority_queue/shortpath/shortpath.cpp
examples/graph/binpack/Makefile
examples/graph/binpack/Makefile.windows
examples/graph/binpack/binpack.cpp
examples/graph/cholesky/Makefile
examples/graph/cholesky/Makefile.windows
examples/graph/cholesky/cholesky.cpp
examples/graph/cholesky/init.cpp
examples/graph/dining_philosophers/Makefile
examples/graph/dining_philosophers/Makefile.windows
examples/graph/dining_philosophers/dining_philosophers.cpp
examples/graph/fgbzip2/Makefile
examples/graph/fgbzip2/Makefile.windows
examples/graph/fgbzip2/blocksort.cpp
examples/graph/fgbzip2/bzlib.cpp
examples/graph/fgbzip2/bzlib.h
examples/graph/fgbzip2/bzlib_private.h
examples/graph/fgbzip2/compress.cpp
examples/graph/fgbzip2/crctable.cpp
examples/graph/fgbzip2/decompress.cpp
examples/graph/fgbzip2/fgbzip2.cpp
examples/graph/fgbzip2/huffman.cpp
examples/graph/fgbzip2/randtable.cpp
examples/graph/logic_sim/D_latch.h
examples/graph/logic_sim/Makefile
examples/graph/logic_sim/Makefile.windows
examples/graph/logic_sim/basics.h
examples/graph/logic_sim/four_bit_adder.h
examples/graph/logic_sim/one_bit_adder.h
examples/graph/logic_sim/test_all.cpp
examples/graph/logic_sim/two_bit_adder.h
examples/graph/matmult/Makefile [deleted file]
examples/graph/matmult/Makefile.windows [deleted file]
examples/graph/matmult/matmult.cpp [deleted file]
examples/graph/matmult/msvs/matmult.sln [deleted file]
examples/graph/matmult/msvs/matmult.vcxproj [deleted file]
examples/graph/matmult/readme.html [deleted file]
examples/graph/som/Makefile
examples/graph/som/Makefile.windows
examples/graph/som/som.cpp
examples/graph/som/som.h
examples/graph/som/som_graph.cpp
examples/graph/stereo/Makefile
examples/graph/stereo/Makefile.windows
examples/graph/stereo/imageEffects.cl
examples/graph/stereo/lodepng.cpp
examples/graph/stereo/lodepng.h
examples/graph/stereo/stereo.cpp
examples/graph/stereo/utils.h
examples/parallel_do/parallel_preorder/Graph.cpp
examples/parallel_do/parallel_preorder/Graph.h
examples/parallel_do/parallel_preorder/Makefile
examples/parallel_do/parallel_preorder/Makefile.windows
examples/parallel_do/parallel_preorder/Matrix.h
examples/parallel_do/parallel_preorder/main.cpp
examples/parallel_do/parallel_preorder/parallel_preorder.cpp
examples/parallel_for/game_of_life/Makefile
examples/parallel_for/game_of_life/Makefile.windows
examples/parallel_for/game_of_life/msvs/resource.h
examples/parallel_for/game_of_life/src/AssemblyInfo.cpp
examples/parallel_for/game_of_life/src/Board.h
examples/parallel_for/game_of_life/src/Evolution.cpp
examples/parallel_for/game_of_life/src/Evolution.h
examples/parallel_for/game_of_life/src/Form1.h
examples/parallel_for/game_of_life/src/Game_of_life.cpp
examples/parallel_for/game_of_life/src/Update_state.cpp
examples/parallel_for/polygon_overlay/Makefile
examples/parallel_for/polygon_overlay/Makefile.windows
examples/parallel_for/polygon_overlay/msvs/resource.h
examples/parallel_for/polygon_overlay/polymain.cpp
examples/parallel_for/polygon_overlay/polymain.h
examples/parallel_for/polygon_overlay/polyover.cpp
examples/parallel_for/polygon_overlay/polyover.h
examples/parallel_for/polygon_overlay/pover_global.h
examples/parallel_for/polygon_overlay/pover_video.cpp
examples/parallel_for/polygon_overlay/pover_video.h
examples/parallel_for/polygon_overlay/rpolygon.h
examples/parallel_for/seismic/Makefile
examples/parallel_for/seismic/Makefile.windows
examples/parallel_for/seismic/main.cpp
examples/parallel_for/seismic/msvs/resource.h
examples/parallel_for/seismic/seismic_video.cpp
examples/parallel_for/seismic/seismic_video.h
examples/parallel_for/seismic/universe.cpp
examples/parallel_for/seismic/universe.h
examples/parallel_for/tachyon/Makefile
examples/parallel_for/tachyon/Makefile.windows
examples/parallel_for/tachyon/msvs/resource.h
examples/parallel_for/tachyon/msvs/win8ui/App.xaml.cpp
examples/parallel_for/tachyon/msvs/win8ui/App.xaml.h
examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.cpp
examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.h
examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.cpp
examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.h
examples/parallel_for/tachyon/msvs/win8ui/copy_libraries_and_assets.bat
examples/parallel_for/tachyon/msvs/win8ui/pch.h
examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.cpp
examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.h
examples/parallel_for/tachyon/src/api.cpp
examples/parallel_for/tachyon/src/api.h
examples/parallel_for/tachyon/src/apigeom.cpp
examples/parallel_for/tachyon/src/apitrigeom.cpp
examples/parallel_for/tachyon/src/apitrigeom.h
examples/parallel_for/tachyon/src/bndbox.cpp
examples/parallel_for/tachyon/src/bndbox.h
examples/parallel_for/tachyon/src/box.cpp
examples/parallel_for/tachyon/src/box.h
examples/parallel_for/tachyon/src/camera.cpp
examples/parallel_for/tachyon/src/camera.h
examples/parallel_for/tachyon/src/coordsys.cpp
examples/parallel_for/tachyon/src/coordsys.h
examples/parallel_for/tachyon/src/cylinder.cpp
examples/parallel_for/tachyon/src/cylinder.h
examples/parallel_for/tachyon/src/extvol.cpp
examples/parallel_for/tachyon/src/extvol.h
examples/parallel_for/tachyon/src/global.cpp
examples/parallel_for/tachyon/src/global.h
examples/parallel_for/tachyon/src/grid.cpp
examples/parallel_for/tachyon/src/grid.h
examples/parallel_for/tachyon/src/imageio.cpp
examples/parallel_for/tachyon/src/imageio.h
examples/parallel_for/tachyon/src/imap.cpp
examples/parallel_for/tachyon/src/imap.h
examples/parallel_for/tachyon/src/intersect.cpp
examples/parallel_for/tachyon/src/intersect.h
examples/parallel_for/tachyon/src/jpeg.cpp
examples/parallel_for/tachyon/src/jpeg.h
examples/parallel_for/tachyon/src/light.cpp
examples/parallel_for/tachyon/src/light.h
examples/parallel_for/tachyon/src/machine.h
examples/parallel_for/tachyon/src/macros.h
examples/parallel_for/tachyon/src/main.cpp
examples/parallel_for/tachyon/src/objbound.cpp
examples/parallel_for/tachyon/src/objbound.h
examples/parallel_for/tachyon/src/parse.cpp
examples/parallel_for/tachyon/src/parse.h
examples/parallel_for/tachyon/src/plane.cpp
examples/parallel_for/tachyon/src/plane.h
examples/parallel_for/tachyon/src/ppm.cpp
examples/parallel_for/tachyon/src/ppm.h
examples/parallel_for/tachyon/src/pthread.cpp
examples/parallel_for/tachyon/src/pthread_w.h
examples/parallel_for/tachyon/src/quadric.cpp
examples/parallel_for/tachyon/src/quadric.h
examples/parallel_for/tachyon/src/render.cpp
examples/parallel_for/tachyon/src/render.h
examples/parallel_for/tachyon/src/ring.cpp
examples/parallel_for/tachyon/src/ring.h
examples/parallel_for/tachyon/src/shade.cpp
examples/parallel_for/tachyon/src/shade.h
examples/parallel_for/tachyon/src/sphere.cpp
examples/parallel_for/tachyon/src/sphere.h
examples/parallel_for/tachyon/src/tachyon_video.cpp
examples/parallel_for/tachyon/src/tachyon_video.h
examples/parallel_for/tachyon/src/texture.cpp
examples/parallel_for/tachyon/src/texture.h
examples/parallel_for/tachyon/src/tgafile.cpp
examples/parallel_for/tachyon/src/tgafile.h
examples/parallel_for/tachyon/src/trace.h
examples/parallel_for/tachyon/src/trace.serial.cpp
examples/parallel_for/tachyon/src/trace.simple.cpp
examples/parallel_for/tachyon/src/trace.tbb.cpp
examples/parallel_for/tachyon/src/trace.tbb1d.cpp
examples/parallel_for/tachyon/src/trace_rest.cpp
examples/parallel_for/tachyon/src/triangle.cpp
examples/parallel_for/tachyon/src/triangle.h
examples/parallel_for/tachyon/src/types.h
examples/parallel_for/tachyon/src/ui.cpp
examples/parallel_for/tachyon/src/ui.h
examples/parallel_for/tachyon/src/util.cpp
examples/parallel_for/tachyon/src/util.h
examples/parallel_for/tachyon/src/vector.cpp
examples/parallel_for/tachyon/src/vector.h
examples/parallel_for/tachyon/src/vol.cpp
examples/parallel_for/tachyon/src/vol.h
examples/parallel_reduce/convex_hull/Makefile
examples/parallel_reduce/convex_hull/Makefile.windows
examples/parallel_reduce/convex_hull/convex_hull.h
examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
examples/parallel_reduce/primes/Makefile
examples/parallel_reduce/primes/Makefile.windows
examples/parallel_reduce/primes/main.cpp
examples/parallel_reduce/primes/primes.cpp
examples/parallel_reduce/primes/primes.h
examples/pipeline/square/Makefile
examples/pipeline/square/Makefile.windows
examples/pipeline/square/gen_input.cpp
examples/pipeline/square/square.cpp
examples/task/tree_sum/Makefile
examples/task/tree_sum/Makefile.windows
examples/task/tree_sum/OptimizedParallelSumTree.cpp
examples/task/tree_sum/SerialSumTree.cpp
examples/task/tree_sum/SimpleParallelSumTree.cpp
examples/task/tree_sum/TreeMaker.h
examples/task/tree_sum/common.h
examples/task/tree_sum/main.cpp
examples/task_arena/fractal/Makefile
examples/task_arena/fractal/Makefile.windows
examples/task_arena/fractal/fractal.cpp
examples/task_arena/fractal/fractal.h
examples/task_arena/fractal/fractal_video.h
examples/task_arena/fractal/main.cpp
examples/task_arena/fractal/msvs/resource.h
examples/task_group/sudoku/Makefile
examples/task_group/sudoku/Makefile.windows
examples/task_group/sudoku/sudoku.cpp
examples/test_all/fibonacci/Fibonacci.cpp
examples/test_all/fibonacci/Makefile
examples/test_all/fibonacci/Makefile.windows
include/serial/tbb/parallel_for.h
include/serial/tbb/tbb_annotate.h
include/tbb/aggregator.h
include/tbb/aligned_space.h
include/tbb/atomic.h
include/tbb/blocked_range.h
include/tbb/blocked_range2d.h
include/tbb/blocked_range3d.h
include/tbb/blocked_rangeNd.h
include/tbb/cache_aligned_allocator.h
include/tbb/combinable.h
include/tbb/compat/condition_variable
include/tbb/compat/ppl.h
include/tbb/compat/thread
include/tbb/compat/tuple
include/tbb/concurrent_hash_map.h
include/tbb/concurrent_lru_cache.h
include/tbb/concurrent_priority_queue.h
include/tbb/concurrent_queue.h
include/tbb/concurrent_unordered_map.h
include/tbb/concurrent_unordered_set.h
include/tbb/concurrent_vector.h
include/tbb/critical_section.h
include/tbb/enumerable_thread_specific.h
include/tbb/flow_graph.h
include/tbb/flow_graph_abstractions.h
include/tbb/flow_graph_opencl_node.h
include/tbb/gfx_factory.h [deleted file]
include/tbb/global_control.h
include/tbb/internal/_aggregator_impl.h
include/tbb/internal/_allocator_traits.h
include/tbb/internal/_concurrent_queue_impl.h
include/tbb/internal/_concurrent_unordered_impl.h
include/tbb/internal/_flow_graph_async_msg_impl.h
include/tbb/internal/_flow_graph_body_impl.h
include/tbb/internal/_flow_graph_cache_impl.h
include/tbb/internal/_flow_graph_impl.h
include/tbb/internal/_flow_graph_indexer_impl.h
include/tbb/internal/_flow_graph_item_buffer_impl.h
include/tbb/internal/_flow_graph_join_impl.h
include/tbb/internal/_flow_graph_node_impl.h
include/tbb/internal/_flow_graph_streaming_node.h
include/tbb/internal/_flow_graph_tagged_buffer_impl.h
include/tbb/internal/_flow_graph_trace_impl.h
include/tbb/internal/_flow_graph_types_impl.h
include/tbb/internal/_mutex_padding.h
include/tbb/internal/_range_iterator.h
include/tbb/internal/_tbb_hash_compare_impl.h
include/tbb/internal/_tbb_strings.h
include/tbb/internal/_tbb_trace_impl.h
include/tbb/internal/_tbb_windef.h
include/tbb/internal/_template_helpers.h
include/tbb/internal/_x86_eliding_mutex_impl.h
include/tbb/internal/_x86_rtm_rw_mutex_impl.h
include/tbb/iterators.h
include/tbb/machine/gcc_arm.h
include/tbb/machine/gcc_generic.h
include/tbb/machine/gcc_ia32_common.h
include/tbb/machine/gcc_itsx.h
include/tbb/machine/ibm_aix51.h
include/tbb/machine/icc_generic.h
include/tbb/machine/linux_common.h
include/tbb/machine/linux_ia32.h
include/tbb/machine/linux_ia64.h
include/tbb/machine/linux_intel64.h
include/tbb/machine/mac_ppc.h
include/tbb/machine/macos_common.h
include/tbb/machine/mic_common.h
include/tbb/machine/msvc_armv7.h
include/tbb/machine/msvc_ia32_common.h
include/tbb/machine/sunos_sparc.h
include/tbb/machine/windows_api.h
include/tbb/machine/windows_ia32.h
include/tbb/machine/windows_intel64.h
include/tbb/memory_pool.h
include/tbb/mutex.h
include/tbb/null_mutex.h
include/tbb/null_rw_mutex.h
include/tbb/parallel_do.h
include/tbb/parallel_for.h
include/tbb/parallel_for_each.h
include/tbb/parallel_invoke.h
include/tbb/parallel_reduce.h
include/tbb/parallel_scan.h
include/tbb/parallel_sort.h
include/tbb/parallel_while.h
include/tbb/partitioner.h
include/tbb/pipeline.h
include/tbb/queuing_mutex.h
include/tbb/queuing_rw_mutex.h
include/tbb/reader_writer_lock.h
include/tbb/recursive_mutex.h
include/tbb/runtime_loader.h
include/tbb/scalable_allocator.h
include/tbb/spin_mutex.h
include/tbb/spin_rw_mutex.h
include/tbb/task.h
include/tbb/task_arena.h
include/tbb/task_group.h
include/tbb/task_scheduler_init.h
include/tbb/task_scheduler_observer.h
include/tbb/tbb.h
include/tbb/tbb_allocator.h
include/tbb/tbb_config.h
include/tbb/tbb_disable_exceptions.h
include/tbb/tbb_exception.h
include/tbb/tbb_machine.h
include/tbb/tbb_profiling.h
include/tbb/tbb_stddef.h
include/tbb/tbb_thread.h
include/tbb/tbbmalloc_proxy.h
include/tbb/tick_count.h
jni/Android.mk
jni/Application.mk
python/Makefile
python/TBB.py
python/rml/Makefile
python/rml/ipc_server.cpp
python/rml/ipc_utils.cpp
python/rml/ipc_utils.h
python/setup.py
python/tbb/__init__.py
python/tbb/__main__.py
python/tbb/api.i
python/tbb/pool.py
python/tbb/test.py
src/Makefile
src/old/concurrent_queue_v2.cpp
src/old/concurrent_queue_v2.h
src/old/concurrent_vector_v2.cpp
src/old/concurrent_vector_v2.h
src/old/spin_rw_mutex_v2.cpp
src/old/spin_rw_mutex_v2.h
src/old/task_v2.cpp
src/old/test_concurrent_queue_v2.cpp
src/old/test_concurrent_vector_v2.cpp
src/old/test_mutex_v2.cpp
src/old/test_task_scheduler_observer_v3.cpp
src/perf/coarse_grained_raii_lru_cache.h
src/perf/cpq_pdes.cpp
src/perf/fibonacci_impl_tbb.cpp
src/perf/perf.cpp
src/perf/perf.h
src/perf/perf_sched.cpp
src/perf/run_statistics.sh
src/perf/statistics.cpp
src/perf/statistics.h
src/perf/statistics_xml.h
src/perf/time_async_return.cpp
src/perf/time_cpq_throughput_test.cpp
src/perf/time_fibonacci_cutoff.cpp
src/perf/time_framework.h
src/perf/time_hash_map.cpp
src/perf/time_hash_map_fill.cpp
src/perf/time_locked_work.cpp
src/perf/time_lru_cache_throughput.cpp
src/perf/time_parallel_for_each.cpp
src/perf/time_sandbox.h
src/perf/time_split_node.cpp
src/perf/time_vector.cpp
src/rml/client/library_assert.h
src/rml/client/omp_dynamic_link.cpp
src/rml/client/omp_dynamic_link.h
src/rml/client/rml_factory.h
src/rml/client/rml_omp.cpp
src/rml/client/rml_tbb.cpp
src/rml/include/rml_base.h
src/rml/include/rml_omp.h
src/rml/include/rml_tbb.h
src/rml/perfor/omp_nested.cpp
src/rml/perfor/omp_simple.cpp
src/rml/perfor/tbb_multi_omp.cpp
src/rml/perfor/tbb_simple.cpp
src/rml/perfor/thread_level.h
src/rml/server/irml.rc
src/rml/server/job_automaton.h
src/rml/server/lin-rml-export.def
src/rml/server/rml_server.cpp
src/rml/server/thread_monitor.h
src/rml/server/wait_counter.h
src/rml/server/win32-rml-export.def
src/rml/server/win64-rml-export.def
src/rml/test/rml_omp_stub.cpp
src/rml/test/test_job_automaton.cpp
src/rml/test/test_rml_mixed.cpp
src/rml/test/test_rml_omp.cpp
src/rml/test/test_rml_omp_c_linkage.c
src/rml/test/test_rml_tbb.cpp
src/rml/test/test_server.h
src/rml/test/test_thread_monitor.cpp
src/tbb/arena.cpp
src/tbb/arena.h
src/tbb/cache_aligned_allocator.cpp
src/tbb/cilk-tbb-interop.h
src/tbb/concurrent_hash_map.cpp
src/tbb/concurrent_monitor.cpp
src/tbb/concurrent_monitor.h
src/tbb/concurrent_queue.cpp
src/tbb/concurrent_vector.cpp
src/tbb/condition_variable.cpp
src/tbb/critical_section.cpp
src/tbb/custom_scheduler.h
src/tbb/dynamic_link.cpp
src/tbb/dynamic_link.h
src/tbb/governor.cpp
src/tbb/governor.h
src/tbb/ia32-masm/atomic_support.asm
src/tbb/ia32-masm/itsx.asm
src/tbb/ia32-masm/lock_byte.asm
src/tbb/ia64-gas/atomic_support.s
src/tbb/ia64-gas/ia64_misc.s
src/tbb/ia64-gas/lock_byte.s
src/tbb/ia64-gas/log2.s
src/tbb/ia64-gas/pause.s
src/tbb/ibm_aix51/atomic_support.c
src/tbb/intel64-masm/atomic_support.asm
src/tbb/intel64-masm/intel64_misc.asm
src/tbb/intel64-masm/itsx.asm
src/tbb/intrusive_list.h
src/tbb/itt_notify.cpp
src/tbb/itt_notify.h
src/tbb/lin32-tbb-export.def
src/tbb/lin32-tbb-export.lst
src/tbb/lin64-tbb-export.def
src/tbb/lin64-tbb-export.lst
src/tbb/lin64ipf-tbb-export.def
src/tbb/lin64ipf-tbb-export.lst
src/tbb/mac32-tbb-export.def
src/tbb/mac32-tbb-export.lst
src/tbb/mac64-tbb-export.def
src/tbb/mac64-tbb-export.lst
src/tbb/mailbox.h
src/tbb/market.cpp
src/tbb/market.h
src/tbb/mutex.cpp
src/tbb/observer_proxy.cpp
src/tbb/observer_proxy.h
src/tbb/pipeline.cpp
src/tbb/private_server.cpp
src/tbb/queuing_mutex.cpp
src/tbb/queuing_rw_mutex.cpp
src/tbb/reader_writer_lock.cpp
src/tbb/recursive_mutex.cpp
src/tbb/scheduler.cpp
src/tbb/scheduler.h
src/tbb/scheduler_common.h
src/tbb/scheduler_utility.h
src/tbb/semaphore.cpp
src/tbb/semaphore.h
src/tbb/spin_mutex.cpp
src/tbb/spin_rw_mutex.cpp
src/tbb/task.cpp
src/tbb/task_group_context.cpp
src/tbb/task_stream.h
src/tbb/task_stream_extended.h
src/tbb/tbb_assert_impl.h
src/tbb/tbb_environment.h
src/tbb/tbb_main.cpp
src/tbb/tbb_main.h
src/tbb/tbb_misc.cpp
src/tbb/tbb_misc.h
src/tbb/tbb_misc_ex.cpp
src/tbb/tbb_resource.rc
src/tbb/tbb_statistics.cpp
src/tbb/tbb_statistics.h
src/tbb/tbb_thread.cpp
src/tbb/tbb_version.h
src/tbb/tls.h
src/tbb/tools_api/disable_warnings.h
src/tbb/tools_api/ittnotify.h
src/tbb/tools_api/ittnotify_config.h
src/tbb/tools_api/ittnotify_static.c
src/tbb/tools_api/ittnotify_static.h
src/tbb/tools_api/ittnotify_types.h
src/tbb/tools_api/legacy/ittnotify.h
src/tbb/win32-tbb-export.def
src/tbb/win32-tbb-export.lst
src/tbb/win64-gcc-tbb-export.def
src/tbb/win64-gcc-tbb-export.lst
src/tbb/win64-tbb-export.def
src/tbb/win64-tbb-export.lst
src/tbb/winrt-tbb-export.lst
src/tbb/x86_rtm_rw_mutex.cpp
src/tbbmalloc/Customize.h
src/tbbmalloc/MapMemory.h
src/tbbmalloc/Statistics.h
src/tbbmalloc/Synchronize.h
src/tbbmalloc/TypeDefinitions.h
src/tbbmalloc/backend.cpp
src/tbbmalloc/backend.h [new file with mode: 0644]
src/tbbmalloc/backref.cpp
src/tbbmalloc/frontend.cpp
src/tbbmalloc/large_objects.cpp
src/tbbmalloc/lin32-proxy-export.def
src/tbbmalloc/lin32-tbbmalloc-export.def
src/tbbmalloc/lin64-proxy-export.def
src/tbbmalloc/lin64-tbbmalloc-export.def
src/tbbmalloc/lin64ipf-proxy-export.def
src/tbbmalloc/lin64ipf-tbbmalloc-export.def
src/tbbmalloc/mac32-tbbmalloc-export.def
src/tbbmalloc/mac64-tbbmalloc-export.def
src/tbbmalloc/proxy.cpp
src/tbbmalloc/proxy.h
src/tbbmalloc/proxy_overload_osx.h
src/tbbmalloc/shared_utils.h
src/tbbmalloc/tbb_function_replacement.cpp
src/tbbmalloc/tbb_function_replacement.h
src/tbbmalloc/tbbmalloc.cpp
src/tbbmalloc/tbbmalloc.rc
src/tbbmalloc/tbbmalloc_internal.h
src/tbbmalloc/tbbmalloc_internal_api.h
src/tbbmalloc/win32-gcc-tbbmalloc-export.def
src/tbbmalloc/win32-tbbmalloc-export.def
src/tbbmalloc/win64-gcc-tbbmalloc-export.def
src/tbbmalloc/win64-tbbmalloc-export.def
src/tbbproxy/tbbproxy-windows.asm
src/tbbproxy/tbbproxy.cpp
src/test/harness.h
src/test/harness_allocator.h
src/test/harness_allocator_overload.h
src/test/harness_assert.h
src/test/harness_bad_expr.h
src/test/harness_barrier.h
src/test/harness_checktype.h
src/test/harness_concurrency.h
src/test/harness_concurrency_tracker.h
src/test/harness_cpu.h
src/test/harness_defs.h
src/test/harness_dynamic_libs.h
src/test/harness_eh.h
src/test/harness_fp.h
src/test/harness_graph.h
src/test/harness_inject_scheduler.h
src/test/harness_iterator.h
src/test/harness_m128.h
src/test/harness_memory.h
src/test/harness_mic.h
src/test/harness_preload.h
src/test/harness_report.h
src/test/harness_runtime_loader.h
src/test/harness_state_trackable.h
src/test/harness_task.h
src/test/harness_tbb_independence.h
src/test/harness_test_cases_framework.h
src/test/harness_tls.h
src/test/harness_tsx.h
src/test/test_ScalableAllocator.cpp
src/test/test_ScalableAllocator_STL.cpp
src/test/test_aggregator.cpp
src/test/test_aligned_space.cpp
src/test/test_allocator.h
src/test/test_allocator_STL.h
src/test/test_assembly.cpp
src/test/test_async_msg.cpp
src/test/test_async_node.cpp
src/test/test_atomic.cpp
src/test/test_blocked_range.cpp
src/test/test_blocked_range2d.cpp
src/test/test_blocked_range3d.cpp
src/test/test_blocked_rangeNd.cpp
src/test/test_broadcast_node.cpp
src/test/test_buffer_node.cpp
src/test/test_cache_aligned_allocator.cpp
src/test/test_cache_aligned_allocator_STL.cpp
src/test/test_cilk_common.h
src/test/test_cilk_dynamic_load.cpp
src/test/test_cilk_interop.cpp
src/test/test_combinable.cpp
src/test/test_composite_node.cpp
src/test/test_concurrent_hash_map.cpp
src/test/test_concurrent_lru_cache.cpp
src/test/test_concurrent_monitor.cpp
src/test/test_concurrent_priority_queue.cpp
src/test/test_concurrent_queue.cpp
src/test/test_concurrent_queue_whitebox.cpp
src/test/test_concurrent_unordered_common.h
src/test/test_concurrent_unordered_map.cpp
src/test/test_concurrent_unordered_set.cpp
src/test/test_concurrent_vector.cpp
src/test/test_condition_variable.h
src/test/test_container_move_support.h
src/test/test_continue_node.cpp
src/test/test_critical_section.cpp
src/test/test_dynamic_link.cpp
src/test/test_eh_algorithms.cpp
src/test/test_eh_flow_graph.cpp
src/test/test_eh_tasks.cpp
src/test/test_enumerable_thread_specific.cpp
src/test/test_environment_whitebox.cpp
src/test/test_examples_common_utility.cpp
src/test/test_fast_random.cpp
src/test/test_flow_graph.cpp
src/test/test_flow_graph_priorities.cpp
src/test/test_flow_graph_whitebox.cpp
src/test/test_fp.cpp
src/test/test_function_node.cpp
src/test/test_gfx_factory.cpp [deleted file]
src/test/test_global_control.cpp
src/test/test_global_control_whitebox.cpp
src/test/test_halt.cpp
src/test/test_handle_perror.cpp
src/test/test_hw_concurrency.cpp
src/test/test_indexer_node.cpp
src/test/test_initializer_list.h
src/test/test_inits_loop.cpp
src/test/test_intrusive_list.cpp
src/test/test_iterators.cpp
src/test/test_ittnotify.cpp
src/test/test_join_node.cpp
src/test/test_join_node.h
src/test/test_join_node_key_matching.cpp
src/test/test_join_node_msg_key_matching.cpp
src/test/test_lambda.cpp
src/test/test_limiter_node.cpp
src/test/test_malloc_atexit.cpp
src/test/test_malloc_compliance.cpp
src/test/test_malloc_init_shutdown.cpp
src/test/test_malloc_lib_unload.cpp
src/test/test_malloc_new_handler.cpp
src/test/test_malloc_overload.cpp
src/test/test_malloc_overload_disable.cpp
src/test/test_malloc_pools.cpp
src/test/test_malloc_pure_c.c
src/test/test_malloc_regression.cpp
src/test/test_malloc_shutdown_hang.cpp
src/test/test_malloc_used_by_lib.cpp
src/test/test_malloc_whitebox.cpp
src/test/test_model_plugin.cpp
src/test/test_multifunction_node.cpp
src/test/test_mutex.cpp
src/test/test_mutex_native_threads.cpp
src/test/test_opencl_node.cl
src/test/test_opencl_node.cpp
src/test/test_openmp.cpp
src/test/test_overwrite_node.cpp
src/test/test_parallel_do.cpp
src/test/test_parallel_for.cpp
src/test/test_parallel_for_each.cpp
src/test/test_parallel_for_vectorization.cpp
src/test/test_parallel_invoke.cpp
src/test/test_parallel_pipeline.cpp
src/test/test_parallel_reduce.cpp
src/test/test_parallel_scan.cpp
src/test/test_parallel_sort.cpp
src/test/test_parallel_while.cpp
src/test/test_partitioner.h
src/test/test_partitioner_whitebox.cpp
src/test/test_partitioner_whitebox.h
src/test/test_pipeline.cpp
src/test/test_pipeline_with_tbf.cpp
src/test/test_priority_queue_node.cpp
src/test/test_queue_node.cpp
src/test/test_range_based_for.h
src/test/test_reader_writer_lock.cpp
src/test/test_runtime_loader.cpp
src/test/test_rwm_upgrade_downgrade.cpp
src/test/test_semaphore.cpp
src/test/test_sequencer_node.cpp
src/test/test_source_node.cpp
src/test/test_split_node.cpp
src/test/test_static_assert.cpp
src/test/test_std_thread.cpp
src/test/test_streaming_node.cpp
src/test/test_tagged_msg.cpp
src/test/test_task.cpp
src/test/test_task_arena.cpp
src/test/test_task_assertions.cpp
src/test/test_task_auto_init.cpp
src/test/test_task_enqueue.cpp
src/test/test_task_group.cpp
src/test/test_task_leaks.cpp
src/test/test_task_priority.cpp
src/test/test_task_scheduler_init.cpp
src/test/test_task_scheduler_observer.cpp
src/test/test_task_steal_limit.cpp
src/test/test_tbb_condition_variable.cpp
src/test/test_tbb_fork.cpp
src/test/test_tbb_header.cpp
src/test/test_tbb_thread.cpp
src/test/test_tbb_version.cpp
src/test/test_thread.h
src/test/test_tick_count.cpp
src/test/test_tuple.cpp
src/test/test_write_once_node.cpp
src/test/test_yield.cpp

diff --git a/CHANGES b/CHANGES
index afcf1b1980255d0048a1764ea2aca401c0588030..d357ef537551e10197675c29836842910242b967 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,27 @@
 The list of most significant changes made over time in
 Intel(R) Threading Building Blocks (Intel(R) TBB).
 
+Intel TBB 2019 Update 6
+TBB_INTERFACE_VERSION == 11006
+
+Changes (w.r.t. Intel TBB 2019 Update 5):
+
+- Added support for Microsoft* Visual Studio* 2019.
+- Added support for enqueuing tbb::task into tbb::task_arena
+    (https://github.com/01org/tbb/issues/116).
+- Improved support for allocator propagation on concurrent_hash_map
+    assigning and swapping.
+- Improved scalable_allocation_command cleanup operations to release
+    more memory buffered by the calling thread.
+- Separated allocation of small and large objects into distinct memory
+    regions, which helps to reduce excessive memory caching inside the
+    TBB allocator.
+
+Preview Features:
+
+- Removed template class gfx_factory from the flow graph API.
+
+------------------------------------------------------------------------
 Intel TBB 2019 Update 5
 TBB_INTERFACE_VERSION == 11005
 
index e024073eae8041a061d57c2255be81e77947a1ad..3c7727f84a95c5dbdf8c450094ac2efef5a95445 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -1041,7 +1041,6 @@ INCLUDE_FILE_PATTERNS  =
 
 PREDEFINED             = TBB_PREVIEW_FLOW_GRAPH_FEATURES \
                          TBB_PREVIEW_FLOW_GRAPH_NODES \
-                         __TBB_GFX_PRESENT \
                          __TBB_PREVIEW_OPENCL_NODE \
                          __TBB_CPP11_RVALUE_REF_PRESENT \
                          __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT \
@@ -1062,7 +1061,6 @@ PREDEFINED             = TBB_PREVIEW_FLOW_GRAPH_FEATURES \
                          __TBB_ALIGNAS_PRESENT \
                          __TBB_CPP11_TEMPLATE_ALIASES_PRESENT \
                          __TBB_FLOW_GRAPH_CPP11_FEATURES \
-                         __TBB_PREVIEW_GFX_FACTORY \
                          __TBB_PREVIEW_STREAMING_NODE
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
index 8dea398f49b3a5e9167950b2017ce6161f6e9194..3603007ed73fd40d1f43bdfe70f35131cb081b67 100644 (file)
--- a/Makefile
+++ b/Makefile
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 tbb_root?=.
 include $(tbb_root)/build/common.inc
index c4a10055ddb4adcee52999eb173952b5f3b23139..d2f5bbc381d806cfca68a3750e1d1095b07e6547 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 # Threading Building Blocks 2019 Update 5
-[![Stable release](https://img.shields.io/badge/version-2019_U5-green.svg)](https://github.com/01org/tbb/releases/tag/2019_U5)
+[![Stable release](https://img.shields.io/badge/version-2019_U6-green.svg)](https://github.com/01org/tbb/releases/tag/2019_U6)
 [![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)
 
 Threading Building Blocks (TBB) lets you easily write parallel C++ programs that take
index 7dcd308d75ce280be55c2967ec21730016242a95..4258a708e6b68da9c69143ca26822cb6f81e1c2e 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 COMPILE_ONLY = -c -MMD
 PREPROC_ONLY = -E -x c++
index 901f15ed5db6ff0ee77838b23909de05a518cff8..5d081c672b2e9f09f511427b8d5540f1087a8cad 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifndef arch
         arch:=$(shell uname -p)
index c35856bd903a57370241ab01dc88747eea339350..042c09b0c42dec82f7478f999cb1c47ad747a9b9 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 COMPILE_ONLY = -c -MMD
 PREPROC_ONLY = -E -x c++
index e1d35e9608da52555a2a654909e4db1db08659e2..6ef75dbabb4ff140aebaa11720a12743f9ebdb40 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifndef arch
         ifeq ($(shell uname -m),i386)
index 03cb462e705fb5f648b3717060a204241dab2c01..c7a2864d7e8cbc6b96ee4e9369e4df3cfdb1566f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include $(tbb_root)/build/BSD.clang.inc
 
index 89a8013bc57ed7f0287e988f331650828259b3ca..190522894a0e8645ee83990ba4e2f2cbf30bb4fd 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 COMPILE_ONLY = -c -MMD
 PREPROC_ONLY = -E -x c++
index 3bfa35e20bdf3f3b5efc047613b04ed3f38912e0..7eafb2743def22ac02c6fc527ae5ea44f7c32301 100644 (file)
@@ -11,9 +11,5 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include $(tbb_root)/build/BSD.inc
index 253148bbfdc11902b8c469e2b23567d016560744..62983a6418f3f2413931bd66f865aa267cba7307 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # TODO: investigate why version_string.ver is not complete when $(RML_SERVER.OBJ) is being compiled.
 .NOTPARALLEL:
index f655da6ddf3936a82e135dc17dfdaa20867b830b..63ee6ebfbbaed7968bab6ffb3a71b173cb8ca16d 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #------------------------------------------------------------------------------
 # Define rules for making the TBB shared library.
index 7b102dc869883af7fc9d1b5d168bb868644203b5..421e95c54bda6294378e9eccbe0c00a2f7be159a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # default target
 default_malloc: malloc malloc_test
index b4cea5a4baa01de0ca82946a84786336dd396da3..196361cc03cf1d321c5c2a572801bf2791d532b1 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # default target
 default_tbbproxy: tbbproxy tbbproxy_test
index ad72edec2cbae1cdbd62c7c96190ff503e3e5f4a..53adb4cabd751fe2a3d4dfec5822a061c311f80c 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #------------------------------------------------------------------------------
 # Define rules for making the TBB tests.
@@ -220,7 +216,6 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT)   \
 # These tests depend on other technologies
 TEST_TBB_SPECIAL.EXE = test_openmp.$(TEST_EXT) \
     test_cilk_interop.$(TEST_EXT)              \
-    test_gfx_factory.$(TEST_EXT)               \
     test_opencl_node.$(TEST_EXT)
 
 # skip mode_plugin for now
@@ -241,7 +236,6 @@ ifdef CILK_AVAILABLE
 # The issue reveals itself if a version of binutils is prior to 2.17
 ifeq (linux_icc,$(tbb_os)_$(compiler))
 test_cilk_interop.$(TEST_EXT): LIBS += -lcilkrts
-test_gfx_factory.$(TEST_EXT): LIBS += -lcilkrts
 endif
 test_tbb_cilk: test_cilk_interop.$(TEST_EXT)
        $(run_cmd) ./test_cilk_interop.$(TEST_EXT) $(args)
@@ -273,7 +267,7 @@ test_tbb_plain: $(TEST_PREREQUISITE) $(TESTS_TO_RUN)
 
 # For deprecated files, we don't mind warnings etc., thus compilation rules are most relaxed
 CPLUS_FLAGS_DEPRECATED = $(DEFINE_KEY)__TBB_TEST_DEPRECATED=1 $(subst $(WARNING_KEY),,$(CPLUS_FLAGS)) $(WARNING_SUPPRESS) $(INCLUDE_KEY)$(tbb_root)/src/test
-TEST_TBB_OLD.OBJ = test_concurrent_vector_v2.$(OBJ) test_concurrent_queue_v2.$(OBJ) test_mutex_v2.$(OBJ) test_task_scheduler_observer_v3.$(OBJ) 
+TEST_TBB_OLD.OBJ = test_concurrent_vector_v2.$(OBJ) test_concurrent_queue_v2.$(OBJ) test_mutex_v2.$(OBJ) test_task_scheduler_observer_v3.$(OBJ)
 
 $(TEST_TBB_OLD.OBJ): CPLUS_FLAGS := $(CPLUS_FLAGS_DEPRECATED)
 
index 1e726c2ce6d39840eed064537da8c8c7c5b0f2f2..dd913a37ebdc8067098ee861758045302a2f56db 100644 (file)
@@ -11,9 +11,5 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include $(tbb_root)/build/BSD.clang.inc
index 3bfa35e20bdf3f3b5efc047613b04ed3f38912e0..7eafb2743def22ac02c6fc527ae5ea44f7c32301 100644 (file)
@@ -11,9 +11,5 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include $(tbb_root)/build/BSD.inc
index 1b857f44b5f4d5c1074cbb62ad5df56c26d2bd72..dd449478a0d1c53197c19212a4adc8082cfbd702 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 COMPILE_ONLY = -c -MMD
 PREPROC_ONLY = -E -x c++
index 625e6d3c4ecd7893d8b0ab23474a88868928aa11..0d8044e97803dc2ef72324075465971f02842758 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifndef arch
         arch:=$(shell uname -p)
index 502fe13544baf25021981a15eb384bc48a9e1613..74b2e47d46e64b7a6d941d7890b94edce08eb938 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 COMPILE_ONLY = -c -xMMD -errtags
 PREPROC_ONLY = -E -xMMD
index 731568fccc6a42e8c12e4c30e824db07f2c7687d..40b3149b48a429525179766b5281355431ec919b 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 COMPILE_ONLY = -c -MMD
index 0c556dd6d15b72fc25299ae9bffa29f568deb085..13b29fb8a5035f5e0ce0164deba870c2baba35dd 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 COMPILE_ONLY = -c -MMD
index b624c25b6c2b6c2908306fe59d419c72dac253ac..921a1f07f6add5e4fe6d8de96a0e1299208f4bbf 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 COMPILE_ONLY = -c -MMD
index 4f538666d74e854f155ef3889981d6191607b0f0..893b33c16dd14bed032a3bc7df5afb13b0f546e5 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #
 # Extra gmake command-line parameters for use with Android:
index 12c905d04dd22f25abb856bec7b457f2adc979c7..39767b6974142a014fcbb2be8f9a0911caa3eab0 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ####### Detections and Commands ###############################################
 
index e0a9d78a541b8906c981f8c4693e21251307ca33..a394750c256f766237ae8926538cbd7f36283aea 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Usage:
 # android.linux.launcher.sh [-v] [-q] [-s] [-r <repeats>] [-u] [-l <library>] <executable> <arg1> <arg2> <argN>
index 6934601f7466f4ed7a9555b9550ef2295171fad9..3efe09dfe11ea5b7f00d7ac2d1370ee27c6ccf19 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ####### Detections and Commands ###############################################
 
index 1d7fb07bde0db931958da62f5b1ef3c65b00c964..c690966ff3c4b838855bbcd6ae659a25c675a875 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ####### Detections and Commands ###############################################
 
index 6ad8e961cac534ac41fa96e3ecdcc418166ea591..dc8849f7c1943f9e8137d7312325b58bd23428ad 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #------------------------------------------------------------------------------
 # Defines settings for building the TBB run-time as a static library.
index 77c685dd56c7b319c46617360c5f21a31af0059e..35a86cb76ea4d38f0b3c3d0b34b2acad479b91a0 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Provides unified tool for preparing TBB for packaging
 
index 2356648c663a0ebee619be7ff662b882cf97a083..9ae279c01324b23186363d38282ce172e7e35b04 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifndef tbb_os
 
index a0207c2dbd9315fbcb643154d0db1bccf34cc498..d56b92485ada3879b623709cd449ffec8ce2f070 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 ifeq ($(tbb_strict),1)
index 96f768acfedfcb908ee923ca74379a669ec0d641..ddc83ffe8be42c78a3ebf386c0c581e41612b53e 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
 function readAllFromFile(fname) {
     var fso = new ActiveXObject("Scripting.FileSystemObject");
index c8bdfab5c51bb513c74461ee998a142a7d1a08fc..d79450ca04e85ea2e7e420a40ff0ef22f4f6bdb1 100644 (file)
@@ -14,10 +14,6 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM See the License for the specific language governing permissions and
 REM limitations under the License.
 REM
-REM
-REM
-REM
-REM
 setlocal
 for %%D in ("%tbb_root%") do set actual_root=%%~fD
 set fslash_root=%actual_root:\=/%
index 3f2dd0618f61a878f69f4a3142d11023365a83d9..49189f22d2a807039316858a5344ab285f868d78 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Script used to generate tbbvars.[c]sh scripts
 bin_dir="$PWD"  # 
index 0e1da2ea49a1943d2b17ac9dc30f25c1eebb75ea..97629706b1a6cc4f5e6e21c0e17b06b73563610e 100644 (file)
@@ -11,9 +11,5 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include $(tbb_root)/build/macos.clang.inc
index 690d55682056933f4aa1325e8b013316d6a26d05..684a82f7e9a9bb2493eb921bafd594f3600c1cf2 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifneq ($(arch),$(filter $(arch),ia32 intel64 armv7 armv7s arm64))
   $(error $(arch) is unknown architecture. Known arhitechtures are ia32 intel64 armv7 armv7s arm64)
index 39222f806348ca3a705a7afed31b926fa4f464db..9965331118edd26a60d5dc2dae57abb1a2fc184c 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= clang++
 CONLY ?= clang
index cab65af46f3ce10e38fd93277a4b6a5290375a9f..aef54f5461baa787c9b004ec2098c26a68fd03e5 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= g++
 CONLY ?= gcc
index 0d6121f09eaa5a4dce2cc09f7c37087851a3d435..3079812abebf97e67fb78ced12650d6326c4ec7c 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= icpc
 CONLY ?= icc
index fd0ca30a3e198a9169296559fac1ee027fb6fba0..e7a264f17c87c3e32121845affbb7e0da6a71b87 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ####### Detections and Commands ###############################################
 
index 1bdc15f71607af2d2c7b4f957091795fd76d0b9e..381b63600ec160feaae5d3eb3447aef53ba44bce 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= pathCC
 CONLY ?= pathcc
index 22580e7ba1449d128476e9ff2ffe02c5a864163f..165aab8a7f09b19f34d603802fe65e2a0b157884 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ####### Detections and Commands ###############################################
 
index b46a9da734ab3b972ba8a36eca2261c2b8bc2c2d..4316fa395265a60c378c22aadce37d58ba1b9e3a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= clang++
 CONLY ?= clang
index 9fea5e41cfcedd3144ae1a1f2770bfa4abb11e67..4df8a5db387eecee0c9cb5b995f0b9003c002c6b 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= g++
 CONLY ?= gcc
index 0598f00d45fea924321e2c1a4ef08ed0496ce6ed..506d98c9c6344a63428ec02c7ff6cdb4b3dacb98 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= icpc
 CONLY ?= icc
index 51d502a847fa510fc01aa6bc18140a147f0d2154..aa2923baf7a3d62cf568692fc3ef61ba27ff936e 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ####### Detections and Commands ###############################################
 
index 1ef3454b90015580ac2be72d392e8f4e180efe3b..39548d8bf12174b8e097df2c45d2d6ca2811cfda 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 CPLUS ?= icpc
 CONLY ?= icc
index 3185e947a9700ab657d383807bf8fa14f0bb24bc..4dcb5b028e152c51c105a2bb0c7592825dfd95bc 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifeq ($(tbb_os),mic)
   $(error MIC supports only cross-compilation.  Specify "target=mic" instead.)
index 2f3cfc97fc0416f444e726ba84bbb596e2851f65..1376eb1183fb7bcf566ba9620b274f608f205f2f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Usage:
 # mic.linux.launcher.sh [-v] [-q] [-s] [-r <repeats>] [-u] [-l <library>] <executable> <arg1> <arg2> <argN>
index 7b2bc4da9e22f127368fa1a20dfaf018601f70c2..407b9931255f82b64d0f994866db8ddf76e3215e 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifneq (mic,$(offload))
   $(error File mic.offload.inc should not be included directly. Use offload=mic instead.)
index 06c5598a46959795f09aa3dea4dabee3f207fc99..e956c5b95b6d9358569340e21a7248127c43d645 100644 (file)
@@ -14,10 +14,6 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM See the License for the specific language governing permissions and
 REM limitations under the License.
 REM
-REM
-REM
-REM
-REM
 
 set cmd_line=
 if DEFINED run_prefix set cmd_line=%run_prefix%
index 8becd654b3635208e30ce2214e18378e6e7e1460..7cb81958dd966168ae0fa2d6c67317de0c6fa288 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Usage:
 # test_launcher.sh [-v] [-q] [-s] [-r <repeats>] [-u] [-l <library>] <executable> <arg1> <arg2> <argN>
index e1397f9e185aefda00e529de09d37836a82885e7..c59ed49783cf836107886c837b56ced9a8d70d45 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS(N) \\"
index 647b3601119237708878519d3cf2a2151d511a1e..3bef60391644d82a84d37411834e91c1f78c67bb 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS(N) \\"
index e1397f9e185aefda00e529de09d37836a82885e7..c59ed49783cf836107886c837b56ced9a8d70d45 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS(N) \\"
index 07cc22567e809cadf86dc3c9b9abf3c70e73a3cb..d49fcf8ed2b0b7e062183cb135bcab611dc380ff 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS(N) \\"
index c9260d510d3f7c59a525ded538534a9eb3869a3b..4e54169be70f0efeea72d7e2b17ba4ecf9f4535b 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS(N) \\"
index 3cfa19e4500f492663811f34b4691dd1412b44fc..bc387cbf90ce3433c875325f43ab2ac130fe8d67 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
 var WshShell = WScript.CreateObject("WScript.Shell");
 
index 55c21a8c1f6c1ee5707639e508cef491df8f1586..b937692c15c2718b2112462432efdf2eeb0e2093 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #------------------------------------------------------------------------------
 # Define compiler-specific variables.
index ad13763d394a442bb524668ae9a10b8c3c9273f4..3ec7cfbd7fe589049674e7ba2fe9bf630efea38a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #------------------------------------------------------------------------------
 # Overriding settings from windows.inc
index 89889e364acd1c9ab72bd4271a414d741e38736a..8010d5fc3c6cb4a95b288849db1c501ac0324c9b 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #------------------------------------------------------------------------------
 # Define compiler-specific variables.
index 19eaf41f3b5461d094ebdadee31260b6fd157a33..fdb9d5b8c33e7c2fe9780aee431ca27027225a11 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 export SHELL = cmd
 
index d106c53d73f58ec40264806c3eb9ca8112cfd14d..a2222e3578b3a6cbb2054d29b1d8224fbdf75199 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #
 # Usage:
index 1ce80f68af856714eec45069f6984b2e1f6a4857..87872931ca215bbfeafa1012febe6b2288791936 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include(CMakeParseArguments)
 
index c1ee5264cb319165daa23b20bd86df9aa1de9df2..8128816f8e36f76d1526cbe4a6bd2c272c7bf311 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2017-2019 Intel Corporation
+# Copyright (c) 2019 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 include(CMakeParseArguments)
 
index 8b17ccf078538607a1643641a333144e3d30fb71..bbcb990b32803ac98d74a4f7df555ccb5be62f99 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 #
 # Usage:
index 5748f7650f5fe86ce545d57b8c3891c9df4018ec..3f94efd1868b39c9188415c406f261575aa2a842 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 function(tbb_conf_gen_print_help)
     message("Usage: cmake -DTBB_ROOT=<tbb_root> -DTBB_OS=Linux|Windows|Darwin [-DSAVE_TO=<path>] -P tbb_config_generator.cmake")
index 3da396a7787d10b61584cc9e415fa3a5aae3134b..ec6abebd2f032d727e7d1c89243778610ba5fbb7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2017-2019 Intel Corporation
+# Copyright (c) 2019 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 function(tbb_conf_gen_print_help)
     message("Usage: cmake -DINSTALL_DIR=<config_install_dir> -DSYSTEM_NAME=Linux|Darwin <parameters> -P tbb_config_generator.cmake
index 4bc8af3fc1f50a8816467254cf18b9f60ef1ea13..5c2b91dadd7bdf5a034393653317ec08bea30b7f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # It defines the following variables:
 #     TBB_tbb_FOUND
index 5bceaa5ceaf3fd46ae81c42bd861d376d7393faf..40528c6df16e665d8f1ffe5f2c85bbab2e4b5bb7 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # TBB_FOUND should not be set explicitly. It is defined automatically by CMake.
 # Handling of TBB_VERSION is in TBBConfigVersion.cmake.
index 19268bb73f7b108f0db43872b9eb0a4e55707fd0..2e31c80edad4ef080663eb1219ab1c84370bcd1d 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 set(PACKAGE_VERSION @TBB_VERSION@)
 
index c27aa0b7df40f581e355279ff3d879a993808a40..0ed0c2e2499bbdf1e0727eb965e7aa785751fcab 100644 (file)
@@ -85,6 +85,8 @@ Software - Supported Compilers
         Windows* OS only)
     Microsoft* Visual C++ 14.1 (Microsoft* Visual Studio* 2017,
         Windows* OS only)
+    Microsoft* Visual C++ 14.2 (Microsoft* Visual Studio* 2019,
+        Windows* OS only)
     Microsoft* Windows* Software Development Kit for Windows* 8.1
     Microsoft* Windows* Software Development Kit for Windows* 10
     For each supported Linux* operating system, the standard gcc
@@ -115,11 +117,6 @@ Library Issues
         the -flifetime-dse=1 option to prevent crashes at runtime,
         or use Intel(R) TBB makefiles that automatically set this option.
 
-    - The current implementation of gfx_factory does not allow memory
-        buffer objects to be used concurrently. As a result, several
-        streaming nodes customized with gfx_factory cannot be connected
-        with each other directly.
-
 ------------------------------------------------------------------------
 (C) 2019 Intel Corporation
 
index 873b1b67397ff423f32529fc70c5ffead1a628a1..8aa56e712de2f493d40fa2ff5b5606fa1d940625 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 5689d58e219f209e3dd4f02a099d4252abf9f9a1..4229ff3a60b611b423a8ed513d403bdfc1020165 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs examples.
 PROG=sub_string_finder_extended
index abad2ee37f2d6532b56be8db433286293828151c..15ad4d284b22c5b55b92dcabfb96250897b44e81 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <iostream>
index be836f9367dbc32697fe9bc9b9ddbf9544cbf24e..c329798a2855bdd3b600fecd281c3d9c7c5ca6c9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_MIC_OFFLOAD
index 08c7331d7ae4b8bfd6b1a11d53755e9d73ceb475..5caf94f33f1902b6b765a8c777decdd586d1b292 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <iostream>
index f18369ac20c567ff79e8668e7af41c3d4333c31b..dd1339b22333ed5e36ed734eddeb479771a109eb 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # This file should be always located and called in $(tbb_root)/examples
 
index bef7f7efa5dc7c4b09ab9859eca835437e0477c3..c1ed9d72f5d267e5d5c923f3f3b582c901110fef 100644 (file)
@@ -14,10 +14,6 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM See the License for the specific language governing permissions and
 REM limitations under the License.
 REM
-REM
-REM
-REM
-REM
 
 :: Getting parameters
 if ("%1") == ("") goto error0
@@ -27,6 +23,17 @@ set arch=%1
 if ("%2") == ("debug") set postfix=_debug
 set output_dir=%3
 
+:: Check if necessary .dll's already exist in output directory
+set dlls=tbb%postfix%.dll tbbmalloc%postfix%.dll
+(for %%a in (%dlls%) do (
+    if not exist %output_dir%\%%a (
+        goto copy_libs
+    )
+))
+:: Necessary .dll's already exist; no need to do anything
+exit /B 0
+
+:copy_libs
 :: Optional 4th parameter to set install root
 if ("%4") NEQ ("") set TBBROOT=%4
 :: Actually we can set install root by ourselves
@@ -41,6 +48,8 @@ if ("%VS140COMNTOOLS%") NEQ ("") set vc_dir=vc14
 :: If it is not, try running Microsoft Visual Studio 2017 from Microsoft* Developer Command Prompt* for VS 2017.
 :: For details, see https://developercommunity.visualstudio.com/content/problem/730/vs154-env-var-vs150comntools-missing-from-build-sy.html
 if ("%VS150COMNTOOLS%") NEQ ("") set vc_dir=vc14
+:: The same comment also applies to Microsoft Visual Studio 2019 and variable VS160COMNTOOLS
+if ("%VS160COMNTOOLS%") NEQ ("") set vc_dir=vc14
 
 :: Are we standalone/oss or inside compiler?
 if exist "%TBBROOT%\bin\%arch%\%vc_dir%\tbb%postfix%.dll" set interim_path=bin\%arch%
index 52d408775442744c7a8b55d081897d577b3a0d63..fb72cfb9281e1cbe5eb378b5abe256348ae07383 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # detect if a compiler can support C++11
 # If CXX0XFLAGS already set, do not change it
index 1c3e8714393b04cbeafaa46f18ddf092002249ef..98e6656319746d23e4aa1fb1c4d3391e38f0c62b 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # The C++ compiler
 #CXX=g++
index 3f8efc4d15dd1869ca5c3b57c8081322c3964837..b481e5e1380599955ca139ffb2ffc9d56deafe15 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Per-build Makefile rules (for recursive $(MAKE) calls from Makefile)
 
index 5117125db9b844528f1c5b55a6646f002d7e1e9b..3cba37a4254877b2fd6245760cf42534d2e14ab5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "video.h"
index e557bda97732d17b0713981bf4d31aed7c9f7b2f..a5568c4ea60c63a6eb8da27fc001f4fe71609208 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // common Windows parts
index 8a326874ef62c8b0c29e2139ba35c1312261ec1b..9eaa59faa9ec9f8f86de4fe657603aff7277b35f 100644 (file)
@@ -14,10 +14,6 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM See the License for the specific language governing permissions and
 REM limitations under the License.
 REM
-REM
-REM
-REM
-REM
 if "%DXSDK_DIR%"=="" goto error_no_DXSDK
 goto end
 
index a5150f32cd34a8e0ed8a324d3b84f89d10c970bb..c6b0168a9526cab3f1f155d2681eddc4eb708a61 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // common Windows parts
index 55f00373d561ca589cbbefde0c49794667e84daf..0051a4c028d6bb98d3f9adb78283c29e683a8758 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "video.h"
index 905a1c0e2afde63c44305a3860fc66c09682c1f6..e186d8001880000ee4b3f5c017b1242eb5164a0d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __VIDEO_H__
index 5b45778e25936c6fba7b68818715d560d22a935c..19b940fc757d577d526658c0dbbcd60d1ec1ac70 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /////// Common internal implementation of Windows-specific stuff //////////////
index 9cc91c25d4857b5e16f075131db635ea0699b466..df324d4204148361cd7cf27d02155fe19ef4d8ed 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #import <Foundation/Foundation.h>
index 39e9650b09ed9de2cd0f69bed1eb57fec335e093..07cbed1bb1b50a07a20cc8a8e4b6671a85eea89c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #import <Foundation/Foundation.h>
index 7133dbb4104955322c177945c25d98f27148e167..a40219ea4d37592d497746b3b190827ecdddec40 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #import <Availability.h>
index 11f7bfd8a3cc411cdb5468a94c2b0d6e4b488706..1766914fb775a09a72e29f6b7f7fffb8e3ed138f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index 283500962245ea3cd7cf9b883106c81a8fe088a1..9c629469904e593fa54d3350ef3c19a508a60a21 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #import "tbbAppDelegate.h"
index 5262d940346614de6ac3ef4ad89b8cefddecbad6..97eaa900214e33942822e7c637f2839cb63269b7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index a1b2476edccfe9859b815bde843128ccfaac0611..7194819b927a78b999675588ef9c5c7fdfc171a8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Uncomment next line to disable shared memory features if you do not have libXext
index 408b16da3ba7fbbb1fa57c33c85e707e3d435ceb..4bc75bfa40bb4e69a8e0eb28d508fca0513d20d4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef FAST_RANDOM_H_
index 89256fc18edaedba88b31880284b6261ff72ef99..ab55007ce09eef34496ffbb340b133720153c073 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef UTILITY_H_
index df419b1ed610b12d9211c768745e34e736274348..069aab79286dde7a1f1286079bfe0b870fdaff60 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 42140b484eb5714b2ba3bd15385adbadbfc429cc..3b1552238bd0a870e1f588e9978d4ca0deb004c8 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 52f77468d4080adbf6eafb75812ee0e928a51119..17851c0cb6cff2742a0caca9988c58b6f033671e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Workaround for ICC 11.0 not finding __sync_fetch_and_add_4 on some of the Linux platforms.
index ee579056e4d416eeeab3fb6da46cc4689df0c60c..5028ce64e45d47ed5b5fc265b1ea62f29c9cceed 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 5d25813e1b7ec11e4e40d723a0778be3567a69dd..d37146a4113157cbdabd08c84a13d8feeffa8ccc 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 1108101d9ce1f465c57352bba1fb9e35e2090666..bbdfcf7c1928f99662635230cf8cbf1f65005f9b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstdio>
index 2d19817b84559346aeb48e10a4658752f550925c..d9d11f773b7e4156f421f01ba1468c6ba3758361 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index e87c3209d275cd91b5f982699ffe4faf76069c8e..eeba49708dfd31713125c3bb6397e1679702823a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 4ca2849f1cedb87d989c3680523eb9084d329813..d089ab0ae98b621440570e17dbe98627edcc9bb5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
index cf207a37b6320ed0aa7bdb74f383ea433c2ec598..7b0c7ded009d3f7a7b5f76f092150f89b4cf5630 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 39a8ac8a50b21970b69e8e187c5cac6b37a01435..5a67e17ad8d38647fdb8ac5f57c4b29d4d6c4886 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index a7dc0b261a8a7ef389d135b4dcd1ffd446aab6f3..aa4376b10522d0ab5ccf360545cd17552a00a4e4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <string>
index 7b0e3cfda4d6a2d94bc9bb4bc076d1b36ffef64f..e8b3a7b4b24b7b52de959a1e63f526139884e91b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstdio>
index 7d9cf6bc69ca42fe502544c911c39bf4413e7d32..fd86266600826234152c3c21727561ce9a7d3c72 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 1e7312948644c95ceb2ee1b51abb9642eb67ffb3..23061f4616933dd23557879e181ffd70079291e4 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 453174bb4efc974014cc1845f47a6f7bf1786fd8..e052e07a08206096a3b2db9371044196ee95900e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER
index fadc8405b975a7ff57e431f4c038558ba1725c1a..cf1ab954f2c91155e14c3ead090a243666ae9fa2 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 
index 6ae4a78d745b00919f1c4a2e4c6a4808141cd0a6..c162c9cf32aa6fb14ba10faecb65958bbc1ad701 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 27c4b55f455099973f872db908b8b6a83cfd339c..82f6c9b95d0321a8aebb674a04a624fdb777bc91 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 56472ea368f794e101fdd831fa4f2c07bbde36a6..d57bf51d8e788554d44aa270f895395f6674f008 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 72da0b519d10335af5940e318f1f3145bc84c093..842c2c058431623c8adf2b7916a564a3a4a7b8a5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 191d8c1503014f36ef3631922a8549b4a5d4f5b0..6c670ad3ae32c3fe9b7ffdaaea6b26863280e6ac 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 0e3d78f86ec488d90883e7843384453fe11a803c..a59c2d0a18ba4eb8dd1bc09c1e46e8014cc97874 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index dc14cfa5ada95e7a333f8e7abd7517f60f7b5a45..bd11d032b487d1c1b021ef0fb7b68cd9ebf4d9c7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 3cf1c388a06aa924784c29658ddf52738645f438..3a6e9dd05146cb60b08445f4e2b68da7851a12da 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index c9b791087d46fcf73bb358fce6c4d3394dd071eb..1e8b4cf9548fca5ec5451f84d58e485859417967 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1
index ebb4fe9abfd4a0e8596688417cef72ce8fb4bfda..5544b1c936c517e4ddc6ceeabc6ff3e8df5839b4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 09364f8aff049509b1fdeeb7d1f0fd67ec06973c..027c2bfc91ad7b065d13536dd8c671d563144cc7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*-------------------------------------------------------------*/
index 23abad3b7087979e843875abb117bb5a2bfb10ea..a991b1b80dfa6dc144cba7cd6cea3b96a181335b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBBexample_graph_logicsim_dlatch_H
index c5814b64625959c21d5a1066191f314ea43fa73c..1aaee5ca948f38fd632d8711e9a40a76d02e39bc 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 7f752b86d536122113e19e8700aa49c1d6762a4d..3d0bd6e103db41be4f543292c8745980aedd66ec 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 PROG=test_all
index de349f86f63095c662de6eeacb0dff4c8414b6e8..76aa3a11459f571aa0eb54fd51e630df24b1ea1f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBBexample_graph_logicsim_basics_H
index f74fd865355f7112a01775c3a79d5efb669b92f2..757494da6a7e4aa48ca715f4f38130c129daaa5f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBBexample_graph_logicsim_fba_H
index b0ed98fb1df1c6de2c79df76ec4484e0bb1e2692..81dccc980985a8be10280abebe14a79b09b030fd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBBexample_graph_logicsim_oba_H
index 884c310640d1c3881fb9cfd913be076ed41fa3c6..6613561ab819bf94396426e9fea28a60fcd2da02 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index d54f9064308319f137539a737e2d192e64610976..ee5e9ded41573b3dd4f970ae7b468ca55f47efcc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBBexample_graph_logicsim_tba_H
diff --git a/examples/graph/matmult/Makefile b/examples/graph/matmult/Makefile
deleted file mode 100644 (file)
index e5176c9..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2016-2019 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-#
-
-# GNU Makefile that builds and runs example.
-
-run_cmd=
-PROG=matmult
-ARGS=
-
-# icpc by default
-ifneq (,$(shell which icc 2>/dev/null))
-    CXX=icpc
-endif
-
-# autodetect C++11 support
-include ../../common/examples-common.inc
-
-ifeq ($(shell uname), Linux)
-LIBS+= -lrt -lpthread -lcilkrts
-else ifeq ($(shell uname), Darwin)
-override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
-endif
-
-all: release test
-
-release:
-       $(CXX) -O2 -DNDEBUG *.cpp $(CXXFLAGS) -o $(PROG) -ltbb $(LIBS) $(CXX0XFLAGS)
-
-debug:
-       $(CXX) -O0 -g -DTBB_USE_DEBUG *.cpp $(CXXFLAGS) -o $(PROG) -ltbb_debug $(LIBS)  $(CXX0XFLAGS)
-
-profile: override CXXFLAGS += -DTBB_USE_THREADING_TOOLS -g
-profile: release
-
-clean:
-       $(RM) $(PROG) *.o *.d
-
-test:
-       $(run_cmd) ./$(PROG) $(ARGS)
-
-perf_build: release
-
-perf_run:
-       $(run_cmd) ./$(PROG)
diff --git a/examples/graph/matmult/Makefile.windows b/examples/graph/matmult/Makefile.windows
deleted file mode 100644 (file)
index 4d88b22..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (c) 2016-2019 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-#
-
-# Common Makefile that builds and runs example.
-
-# Just specify your program basename
-run_cmd=
-PROG=matmult
-ARGS=
-
-# Trying to find if icl.exe is set
-CXX1 = $(TBB_CXX)-
-CXX2 = $(CXX1:icl.exe-=icl.exe)
-CXX  = $(CXX2:-=cl.exe)
-
-# The C++ compiler options
-MYCXXFLAGS = /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /wd4267 /wd4244
-MYLDFLAGS = /INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
-
-all: release test
-
-release:
-       $(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
-
-debug:
-       $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
-
-profile: 
-       $(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /D TBB_USE_THREADING_TOOLS /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
-
-clean:
-       @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
-
-test:
-       $(PROG) $(ARGS)
-
-perf_build: release
-
-perf_run:
-       $(PROG) $(PERF_RUN_ARGS)
-
diff --git a/examples/graph/matmult/matmult.cpp b/examples/graph/matmult/matmult.cpp
deleted file mode 100644 (file)
index 6218078..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
-    Copyright (c) 2016-2019 Intel Corporation
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-
-
-
-*/
-
-// -------------------------------------------------------------------------------------------------
-// This is an example of a matrix multiplication Gen kernel usage with TBB Flow Graph.
-// It exemplifies support for compute offload to Intel(R) Graphics Technology in the flow graph API.
-// -------------------------------------------------------------------------------------------------
-
-#define TBB_PREVIEW_FLOW_GRAPH_NODES 1
-#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1
-
-#include "tbb/tbb_config.h"
-#include "../../common/utility/utility.h"
-
-#if __TBB_PREVIEW_GFX_FACTORY && __TBB_PREVIEW_STREAMING_NODE
-
-#if _MSC_VER
-#pragma warning(disable : 4503) // suppress warning C4503: decorated name length exceeded, name was truncated 
-#endif
-
-// -------------------------------------------------------------------------------------------------
-
-#include <iostream>
-
-#include <cilk/cilk.h>
-#include <cilk/cilk_api.h>
-
-#include "tbb/tick_count.h"
-#include "tbb/flow_graph.h"
-#include "tbb/gfx_factory.h"
-
-// -------------------------------------------------------------------------------------------------
-
-#define SLM_TILE_X (4*8)
-#define SLM_TILE_Y (4*8)
-#define SLM_TILE_K (4*8)
-
-#define SIZE_X (2*SLM_TILE_X)
-#define SIZE_Y (2*SLM_TILE_Y)
-#define SIZE_K (2*SLM_TILE_X)
-
-#ifdef __GFX__
-#define BARRIER _gfx_gpgpu_thread_barrier()
-#else
-#define BARRIER
-#endif
-
-#define TILE_Y 8
-#define TILE_K 8
-#define TILE_X 8
-
-// The naive straightforward algorithm used to obtain reference results on CPU
-void matmult_naive(const float* A, const float* B, float* C) {
-    for (int y = 0; y < SIZE_Y; y++) {
-        for (int x = 0; x < SIZE_X; x++) {
-            C[y * SIZE_Y + x] = (float)0;
-
-            for (int k = 0; k < SIZE_K; k++) {
-                C[y * SIZE_Y + x] += A[y * SIZE_K + k] * B[k * SIZE_K + x];
-            }
-        }
-    }
-}
-
-// Shared Local Memory based algorithm
-__declspec(target(gfx_kernel))
-void matmult_tiled_slm(const float A[][SIZE_K], const float B[][SIZE_X], float C[][SIZE_X]) {
-    // The parallel loop nest below iterates over "supertiles" in the resulting
-    // matrix C and it is parallelized across thread groups, 1 iteration per
-    // group, which effectively means that the loop nest is peeled off.
-    // This kernel is programmed so that each thread group calculates one
-    // resulting supertile in matrix C.
-    _Cilk_for _Thread_group(int tg_y = 0; tg_y < SIZE_Y; tg_y += SLM_TILE_Y) {
-        _Cilk_for _Thread_group(int tg_x = 0; tg_x < SIZE_X; tg_x += SLM_TILE_X) {
-            // declare "supertiles" of each matrix to be allocated in SLM
-            __thread_group_local float slm_atile[SLM_TILE_Y][SLM_TILE_K];
-            __thread_group_local float slm_btile[SLM_TILE_K][SLM_TILE_X];
-            __thread_group_local float slm_ctile[SLM_TILE_Y][SLM_TILE_X];
-
-            // initialize the result supertile (in parallel)
-            //slm_ctile[:][:] = (float)0;
-            _Cilk_for(int i0 = 0; i0 < SLM_TILE_Y; i0++)
-                _Cilk_for(int i1 = 0; i1 < SLM_TILE_X; i1++)
-                    slm_ctile[i0][i1] = (float)0;
-
-            // calculate the dot product of supertiles:
-            for (int super_k = 0; super_k < SIZE_K; super_k += SLM_TILE_K) {
-                // cache A's and B's "supertiles" in SLM (in parallel)
-                //slm_atile[:][:] = A[tg_y:SLM_TILE_Y][super_k:SLM_TILE_K];
-                _Cilk_for(int i0 = 0; i0 < SLM_TILE_Y; i0++)
-                    _Cilk_for(int i1 = 0; i1 < SLM_TILE_K; i1++)
-                        slm_atile[i0][i1] = A[tg_y + i0][super_k + i1];
-
-                //slm_btile[:][:] = B[super_k:SLM_TILE_K][tg_x:SLM_TILE_X];
-                _Cilk_for(int i0 = 0; i0 < SLM_TILE_K; i0++)
-                    _Cilk_for(int i1 = 0; i1 < SLM_TILE_X; i1++)
-                        slm_btile[i0][i1] = B[super_k + i0][tg_x + i1];
-
-                // need a barrier, since every tile in tiles are used by
-                // multiple threads in the group
-                BARRIER;
-
-                // now multiply the supertiles as usual matrices (in parallel)
-                // ...
-                // ... using the most effective tiled algorithm:
-                _Cilk_for(int t_y = 0; t_y < SLM_TILE_Y; t_y += TILE_Y) {
-                    _Cilk_for(int t_x = 0; t_x < SLM_TILE_X; t_x += TILE_X) {
-                        // allocate tiles in registers
-                        float atile[TILE_Y][TILE_K], btile[TILE_X];
-                        float ctile[TILE_Y][TILE_X];
-
-                        // ... and initialize ctile to zero
-                        ctile[:][:] = (float)0;
-
-                        // calculate the dot product of the tiles
-                        for (int k = 0; k < SLM_TILE_K; k += TILE_K) {
-                            atile[:][:] = slm_atile[t_y:TILE_Y][k:TILE_K];
-
-                            for (int k_ind = 0; k_ind < TILE_K; k_ind++) {
-                                btile[:] = slm_btile[k + k_ind][t_x:TILE_X];
-
-                                // multiply current btile row by atile's
-                                // current element and add up to corresponding
-                                // ctile row
-                                for (int y_ind = 0; y_ind < TILE_Y; y_ind++) {
-                                    ctile[y_ind][:] += atile[y_ind][k_ind] *
-                                        btile[:];
-                                }
-                            }
-                        }
-                        // flush the thread-local ctile (registers) into the
-                        // thread group-local supertile (SLM) adding up
-                        // elements
-                        slm_ctile[t_y:TILE_Y][t_x:TILE_X] += ctile[:][:];
-                    }
-                }
-
-                // barrier to make sure
-                // (1) next iteration of the loop does not overwrite a and b
-                //   SLM tiles used in the above calculation of slm_ctile
-                // (2) on the last iteration of the loop, all threads wait
-                //   for the SLM ctile calculation to be completed before
-                //   writing it back to memory below this loop
-                BARRIER;
-            }
-
-            // write (in parallel) the result supertile back to memory:
-            //C[tg_y:SLM_TILE_Y][tg_x:SLM_TILE_X] = slm_ctile[:][:];
-            _Cilk_for(int i0 = 0; i0 < SLM_TILE_Y; i0++)
-                _Cilk_for(int i1 = 0; i1 < SLM_TILE_X; i1++)
-                    C[tg_y + i0][tg_x + i1] = slm_ctile[i0][i1];
-
-            // next iteration of the loop zeroes out slm_ctile - make sure this
-            // always happens after slm_ctile has been dumped to memory (above
-            // loop nest completes):
-            BARRIER;
-        }
-    }
-}
-
-// Matrix initialization function
-void init_matrix(int width, int height, float* matrix) {
-    for (int j = 0; j < height; j++) {
-        for (int i = 0; i < width; i++) {
-            matrix[j * height + i] = (float)(j * 4 + i);
-        }
-    }
-}
-
-// Validate matrix with reference values
-bool validate_mat(char *title, int size_y, int size_x, const float* mat, const float* ref_mat) {
-    int err_cnt = 0;
-    printf("verifying %s...", title);
-    fflush(stdout);
-
-    for (int y = 0; y < size_y; y++) {
-        for (int x = 0; x < size_x; x++) {
-            float val = mat[y * size_y + x];
-            float gold_val = ref_mat[y * size_y + x];
-
-            if (val != gold_val) {
-                if (err_cnt == 0) {
-                    printf("\n");
-                }
-                if (++err_cnt < 10) {
-                    std::cout <<
-                        "  ERROR at [" << y << "][" << x << "]: " <<
-                        val << "(should be " << gold_val << ")" << std::endl;
-                }
-            }
-        }
-    }
-    if (err_cnt == 0) {
-        printf(" ok\n");
-    } else {
-        printf("FAILED\n");
-    }
-    return err_cnt == 0;
-}
-
-// ----------------------------------------------------------------------------
-// Helper types and functions
-// ----------------------------------------------------------------------------
-
-struct matrix_size {
-    int columns;
-    int rows;
-};
-
-typedef std::tuple< tbb::flow::gfx_buffer<float>,
-                    tbb::flow::gfx_buffer<float>,
-                    tbb::flow::gfx_buffer<float> > kernel_args_type;
-typedef kernel_args_type cpu_args_type;
-typedef kernel_args_type validation_args_type;
-
-// Constructs flow graph with three computation nodes that all make matrixes multiplication
-// - CPU node - obtains reference result on CPU
-// - CPU SLM node - Intel(R) Cilk(TM) based matrixes multiplication implementation on CPU
-// - GPU node - obtains result on GPU using GFX offload API
-void mat_multiplication() {
-
-    //------------------------------------------
-    // TBB Flow Graph nodes declaration section
-    //------------------------------------------
-
-    tbb::flow::graph g;
-    tbb::flow::gfx_factory factory(g);
-
-    // Enqueue task for running on Gen
-    tbb::flow::split_node< kernel_args_type > gpu_slm_split_n(g);
-    tbb::flow::streaming_node< kernel_args_type, tbb::flow::queueing, tbb::flow::gfx_factory > gpu_slm_mat_mult_n(g, matmult_tiled_slm, tbb::flow::gfx_factory::dummy_device_selector(), factory);
-
-    // Obtain SLM algorithm result on CPU
-    tbb::flow::function_node< cpu_args_type, tbb::flow::gfx_buffer<float> > cpu_slm_mat_mult_n(g, tbb::flow::unlimited, [](const cpu_args_type& args) -> tbb::flow::gfx_buffer<float> {
-        // Get references to matrixes
-        const tbb::flow::gfx_buffer<float >& A_MATRIX = std::get<0>(args);
-        const tbb::flow::gfx_buffer<float>& B_MATRIX  = std::get<1>(args);
-        tbb::flow::gfx_buffer<float> CPU_SLM_MATRIX   = std::get<2>(args);
-
-        matmult_tiled_slm((float(*)[SIZE_K])A_MATRIX.data(), (float(*)[SIZE_X])B_MATRIX.data(), (float(*)[SIZE_X])CPU_SLM_MATRIX.data());
-
-        return CPU_SLM_MATRIX;
-    });
-
-    // Obtain reference result on CPU
-    tbb::flow::function_node< cpu_args_type, tbb::flow::gfx_buffer<float> > cpu_naive_mat_mult_n(g, tbb::flow::unlimited, [](const cpu_args_type& args) -> tbb::flow::gfx_buffer<float> {
-        // Get references to matrixes
-        const tbb::flow::gfx_buffer<float>& A_MATRIX  = std::get<0>(args);
-        const tbb::flow::gfx_buffer<float>& B_MATRIX  = std::get<1>(args);
-        tbb::flow::gfx_buffer<float> CPU_NAIVE_MATRIX = std::get<2>(args);
-
-        matmult_naive(A_MATRIX.data(), B_MATRIX.data(), CPU_NAIVE_MATRIX.data());
-
-        return CPU_NAIVE_MATRIX;
-    });
-
-    // Validate computed matrixes
-    tbb::flow::join_node< validation_args_type > validation_join_n(g);
-    tbb::flow::function_node< validation_args_type > mat_validation_n(g, tbb::flow::unlimited, [](const validation_args_type& result) {
-        // Get references to matrixes
-        const tbb::flow::gfx_buffer<float>& GPU_SLM_MAT   = std::get<0>(result);
-        const tbb::flow::gfx_buffer<float>& CPU_SLM_MAT   = std::get<1>(result);
-        const tbb::flow::gfx_buffer<float>& CPU_NAIVE_MAT = std::get<2>(result);
-
-        // Verify results
-        // Check that slm algorithm produces correct results on CPU:
-        validate_mat("matrix multiply: 'SLM' CPU vs. CPU", SIZE_Y, SIZE_X, CPU_SLM_MAT.data(), CPU_NAIVE_MAT.data());
-        // Verify Gen results:
-        validate_mat("matrix multiply: SLM Gen vs. CPU", SIZE_Y, SIZE_X, GPU_SLM_MAT.data(), CPU_NAIVE_MAT.data());
-    });
-
-    //-----------------------------------------
-    // Make edge section - connecting nodes
-    //-----------------------------------------
-
-    // Prepare main graph input ports for data
-    make_edge(tbb::flow::output_port<0>(gpu_slm_split_n), tbb::flow::input_port<0>(gpu_slm_mat_mult_n));
-    make_edge(tbb::flow::output_port<1>(gpu_slm_split_n), tbb::flow::input_port<1>(gpu_slm_mat_mult_n));
-    make_edge(tbb::flow::output_port<2>(gpu_slm_split_n), tbb::flow::input_port<2>(gpu_slm_mat_mult_n));
-
-    // Join results
-    make_edge(tbb::flow::output_port<2>(gpu_slm_mat_mult_n), tbb::flow::input_port<0>(validation_join_n));
-    make_edge(cpu_slm_mat_mult_n, tbb::flow::input_port<1>(validation_join_n));
-    make_edge(cpu_naive_mat_mult_n, tbb::flow::input_port<2>(validation_join_n));
-
-    //Verify correctness
-    make_edge(validation_join_n, mat_validation_n);
-
-    // Set args for GFX kernel.
-    // Default behaviour if not set.
-    gpu_slm_mat_mult_n.set_args(tbb::flow::port_ref<0, 2>);
-
-    //-----------------------------------------
-    // Input sizes and matrixes initialization
-    //-----------------------------------------
-
-    const matrix_size A_MATRIX_SIZE         = { SIZE_Y, SIZE_K };
-    const matrix_size B_MATRIX_SIZE         = { SIZE_K, SIZE_X };
-    const matrix_size GPU_SLM_MATRIX_SIZE   = { SIZE_Y, SIZE_X };
-    const matrix_size CPU_SLM_MATRIX_SIZE   = { SIZE_Y, SIZE_X };
-    const matrix_size CPU_NAIVE_MATRIX_SIZE = { SIZE_Y, SIZE_X };
-
-    tbb::flow::gfx_buffer<float> A_MATRIX(A_MATRIX_SIZE.columns * A_MATRIX_SIZE.rows);
-    tbb::flow::gfx_buffer<float> B_MATRIX(B_MATRIX_SIZE.columns * B_MATRIX_SIZE.rows);
-    tbb::flow::gfx_buffer<float> GPU_SLM_MATRIX(GPU_SLM_MATRIX_SIZE.columns * GPU_SLM_MATRIX_SIZE.rows);
-    tbb::flow::gfx_buffer<float> CPU_SLM_MATRIX(CPU_SLM_MATRIX_SIZE.columns * CPU_SLM_MATRIX_SIZE.rows);
-    tbb::flow::gfx_buffer<float> CPU_NAIVE_MATRIX(CPU_NAIVE_MATRIX_SIZE.columns * CPU_NAIVE_MATRIX_SIZE.rows);
-
-    // Intitialize input matrixes
-    init_matrix(A_MATRIX_SIZE.columns, A_MATRIX_SIZE.rows, A_MATRIX.data());
-    init_matrix(B_MATRIX_SIZE.columns, B_MATRIX_SIZE.rows, B_MATRIX.data());
-
-    // Make tuples with input data for graph
-    kernel_args_type GPU_SLM_INPUT   = std::make_tuple(A_MATRIX, B_MATRIX, GPU_SLM_MATRIX);
-    kernel_args_type CPU_SLM_INPUT   = std::make_tuple(A_MATRIX, B_MATRIX, CPU_SLM_MATRIX);
-    kernel_args_type CPU_NAIVE_INPUT = std::make_tuple(A_MATRIX, B_MATRIX, CPU_NAIVE_MATRIX);
-
-    //-----------------------------------------
-    // Send input to the graph and run it
-    //-----------------------------------------
-
-    gpu_slm_split_n.try_put(GPU_SLM_INPUT);
-    cpu_slm_mat_mult_n.try_put(CPU_SLM_INPUT);
-    cpu_naive_mat_mult_n.try_put(CPU_NAIVE_INPUT);
-
-    // Run graph
-    g.wait_for_all();
-}
-
-//---------------------------------------------------------------------------------
-
-int main(int argc, char* argv[]) {
-    try {
-        tbb::tick_count mainStartTime = tbb::tick_count::now();
-
-        utility::parse_cli_arguments(argc, argv,
-            utility::cli_argument_pack()
-            //"-h" option for displaying help is present implicitly
-        );
-
-        // Compute matrices and verify result
-        mat_multiplication();
-
-        utility::report_elapsed_time((tbb::tick_count::now() - mainStartTime).seconds());
-        return 0;
-    } catch (std::exception& e) {
-        std::cerr << "Error occurred. Error text is : \"" << e.what() << "\"\n";
-        return -1;
-    }
-}
-
-#else
-int main() {
-    utility::report_skipped();
-    return 0;
-}
-#endif /* __TBB_PREVIEW_GFX_FACTORY && __TBB_PREVIEW_STREAMING_NODE */
diff --git a/examples/graph/matmult/msvs/matmult.sln b/examples/graph/matmult/msvs/matmult.sln
deleted file mode 100644 (file)
index 73f132c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.40629.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "matmult", "matmult.vcxproj", "{517E31A4-BEED-481A-A5A7-5B37B82A1C16}"
-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
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|Win32.ActiveCfg = Debug|Win32
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|Win32.Build.0 = Debug|Win32
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|x64.ActiveCfg = Debug|x64
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|x64.Build.0 = Debug|x64
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|Win32.ActiveCfg = Release|Win32
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|Win32.Build.0 = Release|Win32
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|x64.ActiveCfg = Release|x64
-               {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|x64.Build.0 = Release|x64
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal
diff --git a/examples/graph/matmult/msvs/matmult.vcxproj b/examples/graph/matmult/msvs/matmult.vcxproj
deleted file mode 100644 (file)
index e9ebbee..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{517E31A4-BEED-481A-A5A7-5B37B82A1C16}</ProjectGuid>
-    <RootNamespace>matmult</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>$(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>$(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>$(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <IntDir>$(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <SDLCheck>true</SDLCheck>
-      <AdditionalIncludeDirectories>$(TBBROOT)\include;$(SolutionDir)\..\..\..\..\include;</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>$(TBBROOT)\lib\ia32\vc_mt;$(TBBROOT)\lib\ia32\vc12;$(SolutionDir)\..\..\..\..\lib\ia32\vc_mt;$(SolutionDir)\..\..\..\..\lib\ia32\vc12;</AdditionalLibraryDirectories>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <SDLCheck>true</SDLCheck>
-      <AdditionalIncludeDirectories>$(TBBROOT)\include;$(SolutionDir)\..\..\..\..\include;</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>$(TBBROOT)\lib\intel64\vc_mt;$(TBBROOT)\lib\intel64\vc12;$(SolutionDir)\..\..\..\..\lib\intel64\vc_mt;$(SolutionDir)\..\..\..\..\lib\intel64\vc12;</AdditionalLibraryDirectories>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <SDLCheck>true</SDLCheck>
-      <AdditionalIncludeDirectories>$(TBBROOT)\include;$(SolutionDir)\..\..\..\..\include;</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>$(TBBROOT)\lib\ia32\vc_mt;$(TBBROOT)\lib\ia32\vc12;$(SolutionDir)\..\..\..\..\lib\ia32\vc_mt;$(SolutionDir)\..\..\..\..\lib\ia32\vc12;</AdditionalLibraryDirectories>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <SDLCheck>true</SDLCheck>
-      <AdditionalIncludeDirectories>$(TBBROOT)\include;$(SolutionDir)\..\..\..\..\include;</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>$(TBBROOT)\lib\intel64\vc_mt;$(TBBROOT)\lib\intel64\vc12;$(SolutionDir)\..\..\..\..\lib\intel64\vc_mt;$(SolutionDir)\..\..\..\..\lib\intel64\vc12;</AdditionalLibraryDirectories>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="..\matmult.cpp" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
\ No newline at end of file
diff --git a/examples/graph/matmult/readme.html b/examples/graph/matmult/readme.html
deleted file mode 100644 (file)
index 01cac33..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
-<!DOCTYPE html>
-<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
-<head>
-       <meta charset="UTF-8">
-       <style>
-               ::selection {
-                       background: #b7ffb7;
-               }
-               ::-moz-selection {
-                       background: #b7ffb7;
-               }
-
-               body {
-                       font-family: Arial, Helvetica, sans-serif;
-                       font-size: 16px;
-                       width: 800px;
-                       margin: 0 auto;
-               }
-               #banner {
-                       /* Div for banner */
-                       float:left;
-                       margin: 0px;
-                       margin-bottom: 10px;
-                       width: 100%;
-                       background-color: #0071C5;
-                       z-index: 0;
-               }
-               #banner .logo {
-                       /* Apply to logo in banner. Add as class to image tag. */
-                       float: left;
-                       margin-right: 20px;
-                       margin-left: 20px;
-                       margin-top: 15px;
-                       padding-bottom: 5px;
-               }
-               h1 {
-                       text-align: center;
-                       font-size: 36px;
-               }
-               h1.title {
-                       /* Add as class to H1 in banner */
-                       font-family: "Intel Clear", Verdana, Arial, sans-serif;
-                       font-weight:normal;
-                       color: #FFFFFF;
-                       font-size: 170%;
-                       margin-right: 40px;
-                       margin-left: 40px;
-                       padding-right: 20px;
-                       text-indent: 20px;
-               }
-               .h3-alike {
-                       display:inline;
-                       font-size: 1.17em;
-                       font-weight: bold;
-                       color: #0071C5;
-               }
-               h3 {
-                       font-size: 1.17em;
-                       font-weight: bold;
-                       color: #0071C5;
-               }
-               .h4-alike {
-                       display:inline;
-                       font-size: 1.05em;
-                       font-weight: bold;
-               }
-               pre {
-                       font-family: "Consolas", Monaco, monospace;
-                       font-size:small;
-                       background: #fafafa;
-                       margin: 0;
-                       padding-left:20px;
-               }
-               #footer {
-                       font-size: small;
-               }
-               code {
-                       font-family: "Consolas", Monaco, monospace;
-               }
-               .code-block
-               {
-                       padding-left:20px;
-               }
-               .changes {
-                       margin: 1em 0;
-               }
-               .changes input:active {
-                       position: relative;
-                       top: 1px;
-               }
-               .changes input:hover:after {
-                       padding-left: 16px;
-                       font-size: 10px;
-                       content: 'More';
-               }
-               .changes input:checked:hover:after {
-                       content: 'Less';
-               }
-               .changes input + .show-hide {
-                       display: none;
-               }
-               .changes input:checked + .show-hide {
-                       display: block;
-               }
-
-               ul {
-                       margin: 0;
-                       padding: 0.5em 0 0.5em 2.5em;
-               }
-               ul li {
-                       margin-bottom: 3px;
-               }
-               ul li:last-child {
-                       margin-bottom: 0;
-               }
-               .disc {
-                       list-style-type:disc
-               }
-               .circ {
-                       list-style-type:circle
-               }
-               
-               .single {
-                       padding: 0 0.5em;
-               }
-               
-               /* ------------------------------------------------- */
-               /* Table styles                                      */
-               table{
-                       margin-bottom:5pt;
-                       border-collapse:collapse;
-                       margin-left:0px;
-                       margin-top:0.3em;
-                       font-size:10pt;
-               }
-               tr{
-                       vertical-align:top;
-               }
-               th,
-               th h3{
-                       padding:4px;
-                       text-align:left;
-                       background-color:#0071C5;
-                       font-weight:bold;
-                       margin-top:1px;
-                       margin-bottom:0;
-                       color:#FFFFFF;
-                       font-size:10pt;
-                       vertical-align:middle;
-               }
-               th{
-                       border:1px #dddddd solid;
-                       padding-top:2px;                 
-                       padding-bottom:0px;
-                       padding-right:3px;               
-                       padding-left:3px;
-               }
-               td{
-                       border:1px #dddddd solid;
-                       vertical-align:top;
-                       font-size:100%;
-                       text-align:left;
-                       margin-bottom:0;
-               }
-               td,
-               td p{
-                       margin-top:0;
-                       margin-left:0;
-                       text-align:left;
-                       font-size:inherit;
-                       line-height:120%;
-               }
-               td p{
-                       margin-bottom:0;
-                       padding-top:5px;
-                       padding-bottom:5px;
-                       padding-right:5px;
-                       padding-left:1px;
-               }
-               .noborder{
-                       border:0px none;
-               }
-               .noborder1stcol{
-                       border:0px none;
-                       padding-left:0pt;
-               }
-               td ol{
-                       font-size:inherit;
-                       margin-left:28px;
-               }
-               td ul{
-                       font-size:inherit;
-                       margin-left:24px;
-               }
-               .DefListTbl{
-                       width:90%;
-                       margin-left:-3pt;
-               }
-               .syntaxdiagramtbl{
-                       margin-left:-3pt;
-               }
-               .sdtbl{
-               }
-               .sdrow{
-               }
-               .sdtblp{
-                       border:0px none;
-                       font-size:inherit;
-                       line-height:120%;
-                       margin-bottom:0;
-                       padding-bottom:0px;
-                       padding-top:5px;
-                       padding-left:0px;
-                       padding-right:5px;
-                       vertical-align:top;
-               }
-               .idepara, .ide_para{
-                       border:0px none;
-                       font-size:inherit;
-                       line-height:120%;
-                       margin-bottom:0;
-                       padding-bottom:0px;
-                       padding-top:5px;
-                       padding-left:0px;
-                       padding-right:5px;
-                       vertical-align:top;
-               }
-               
-               .specs {
-                       border-collapse:collapse;
-               }
-               .specs td, .specs th {
-                       font-size: 14px;
-               }
-               .specs td {
-                       border: 1px solid black;
-               }
-               .specs td td, .specs td th {
-                       border: none;
-               }
-               .specs  td, .specs td td, .specs td th {
-                       padding: 0 0.2em 0.2em;
-                       text-align: center;
-               }
-               .specs td tr:last-child td, 
-               .specs td tr:last-child th {
-                       padding: 0 0.2em;
-               }
-               .serial-time {
-               }
-               .modified-time {
-               width: 6.5em;
-               }
-               .compiler {
-               }
-               .comp-opt {
-               }
-               .sys-specs {
-                       width: 18em;
-               }
-               .note {
-                       font-size:small;
-                       font-style: italic;
-               }
-       </style>
-       <title>Intel&reg; Threading Building Blocks. matmult sample</title>
-</head>
-<body>
-       
-       <div id="banner">
-               <img class="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAsCAYAAAA+aAX8AAAAAXNSR0IArs4c6QAAAARnQU1BAACx
-                               jwv8YQUAAAAJcEhZcwAALiIAAC4iAari3ZIAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVh
-                               ZHlxyWU8AAAIN0lEQVRoQ+WaCaxdUxSGW2ouatZWaVS15nkqkZhSVERQglLEPCam1BCixhqqCKUS
-                               NIiYpxhqHmouIeaY5ylFzA/v1fev8+/j3N5737v3vtf3buNP/uy9/7X2Ovuse4a997m9mgltbW2L
-                               wRHwcHgFfAx+AH+GCb/BT2fNmvUk5ZXwYOrrOsTcCU5CJ74pPBJeA5+Bn8LfOLmagf/f8Af4NrwD
-                               ngg3wdTHh2pOMMB1Gejx8AE4M85mNqD/A7+D78GXkXQFTIMPwUfhdPg6/AxWTRw29b8QruPD9zwY
-                               zPrwHPi2xxmg3QrfgDfD05BGU24EB1HvC3s7REXgtwDsDzeEY+Ak+AJsUfwE2sJdcBN37V4whiU4
-                               +KGUM2JEBtpzUInZEa5g9y4FcYfAo+GLPmwOND2HFrXrnAUHWgnq0vzDB2+Bt0H9coPs1m3gmNvD
-                               ZyITBu234Jp26XoQfCC80sfTAXVv7wOXskuPgnHoSvnTw9P49MDdyOauAQEXhWdC4Vd4ARxmc1OB
-                               cW0Gv3U+lJDvKFa0ufMg4GXwR3gs7J57sRNoaWnR2+znLB2RkKds6jwItvbckIQiGO+eTkSby71t
-                               qh100qtsUCJxmmpSw5i2gWebR1jWm2047T1gf0vyfViJEKi/TtHua7wMdNJs8U/zDzjUpqYA47k4
-                               O704wY+kUZ2P+glQc5ldac9j323sF1cH2EB6h8BxYZdbRDeDOJ16UBJiHDFuMMdYbhjEGA8DxJ4h
-                               jXIemmMpz6ccqbZ1JUlT/3SrHC+9XeB0MjzV9RHqKFAXVg2nBkH/lxxO8aZYbhjEKEuGQH1BuCKc
-                               z1IAN61jAtiut1wZ+ByIkwa6r9t6ZmhSFZw9eL0gxiMw4SLLDYMYFZNRDbhpcpgwzXI5MOqSEvKM
-                               Ue8D+xU4r/Xe+C8HB1ThkhFgNqAXk6FVqyZuA1LcItBXQd+WUvf6YMslwFZvMs7KvMP/SculwKa3
-                               hfYPPsZpfsvS9QD9PRHbcOmUC9J+H2qfoRJ/0MHgFhHIQC8mQ8twxZ0Ji099vSGegn/TP0BdD/Db
-                               Ycn0nna9yZiceQcetFwKDE/4oNtZCtDeXHoC7dWlU1Uyvs7U6sBHJ7FaBAPU82TYJUAzFnCU+1mq
-                               COyfwGLi6k3G05l34BrL/wFxjA/0mKUcaNqBKiJODHclQ3sLCVqZprfEvVCLtThhiskRDFAvXhnv
-                               QPlfi5uW7ytTL14Nr0Bd1pfDXy1Lv93h6koGLstCLR/SuPJ5SQBBD8hPZATbWs6BrdZk7B4dDNpT
-                               Mjkw3bL0YjLOsxygPUWDyExtD1GNV6JAeyTUBlDCKtbrScYxhfjyj1s+B9o+dnifIj94AnpNyaC9
-                               f3QwkNJCTnjOsvRiMi6xrHiaA3ycyYFNbcqBpisl/aoHWaspGdg03uIc43mb/gOilt3CREslQG80
-                               GedmlkC1KyNPBnU9wOPWMp6Aut0S74HfwIQJ7ldTMjBPdBIiGWC0TRkQlseWNmR2tlwC9DmZjEmW
-                               pQ/zOAKqtwdcrnW/DpOBPtp9Ii6F9lhL1yWIo2zUvVhxzYHeLVcG/QfT/iuTA3qwan+zGndVP8p2
-                               k4G8E/wLW4D6PxTlnxgwaDEjaMe6n+USYOvqZKTbUrjQcor3ZSYHRtjULvCrmgwkfY5oRc9B+3Cb
-                               S4FhIhS+gAtZLgH9Y6GWuQU6mwx9IEqYajlA+47CsZ6lGovFBDTNkA9xM4CmpXsAWySDUrPjqZQl
-                               QBsfnSoB41UKAvS9ouJmDfpaDpTQ2WRcXYinCZm+pdyEtDClPgLloP0unABPp3lrpoZ+KkWskSgP
-                               sVZMhlat2t7LQftE2aoCh0sVBOheXclyCYjTp7W19bUsZAQtJuPLTA39gOhg0D7PJtny1xj1tWA+
-                               sUpAG2j7mZaqAh9tzPSVP+XStL+w/qY1XRlfWdOSYXvp7QKnU6Ayqk4jLZcB2zD4gv1iu52qkvG5
-                               NKPsyrCuPs9aDtDeDr4EtS7RRyXNCgfYLPtYfoC33D0Hul6tE6jOfvsMhVqaT8PWG85PXR+WxlOP
-                               pHUIHPNXDsif7NWAT773STdlX6vK4ebi4WRgWybZqFe86tBXUAw4BL+S7UTautTXo9yFcjdKPbsq
-                               PuQTsKdbZ16YLzZrAgdRRvXLCF/Big/R/wXInn5dffdMt8opNs214Bz6cyqNbUDRcZwTIWjDt3m+
-                               XtcBxq3pvL6p6mFftlFUE+i8JPxRCRGoawVbcVepGcF4V4eTGPNPHv+7NjUGAhzmQOl20fyhphlg
-                               T4CxLcQw9WC9Gxb3P4Q37NY4CHJXCuhSW3JnwEXs0qNgSHqVbw210ZP2XwK0A65/6C6NgziaAU5X
-                               wCIUHB4H86227gKH1+JtL3gd1N5sCdACbgZo5rtgnQKx+hLs/ixsdjBXBd2TtyKNhUOp1/dprgMQ
-                               rx9x16fcn1KbttrIyf9OkICWw1KApvY2YyXbpSBobKf7OGXApFtI+5d3Qq1BDoL6V87GcDVc9Ivq
-                               E4D+bjTQbc1i9demreDu8Ch0ffG6hdnmDMrvFbsSsAXczIGk3fwb4VYe+pwBB9Angkd83ADtqgkq
-                               AjetdTTV1icDlfl+Qi3AP4elHEjaDXscHgFjPdNt4ID6S9B9sNLiKoelmuFuJbCpDJi+hvqz2qFw
-                               iIfWc2AQusxPgvq484vH2eUgtpYHH0Hteeqb75ZwMQ+j+cDg9PlwFDwd6o9sr0KtbWI/tSPgp32M
-                               76H+s6mNX3030df5neGq1OtbZDUbOIlFoFaha0L9j0qfCHeAerDqVtODU8+hNThZfR1fHHbpG6kx
-                               9Or1LzUmVVz+HJXDAAAAAElFTkSuQmCC">
-               <h1 class="title">Intel&reg; Threading Building Blocks.<br>matmult sample</h1>
-       </div>
-
-       <p>
-               The Matmult is an example of a Gen kernel implementing matrix multiplication.
-       <br>
-       <br>
-               It exemplifies support for compute offload to Intel&reg; Graphics Technology in the flow graph API.
-       <br><br>
-               This example uses C++11 features. Specifying a compiler option such as -std=c++11 or similar might be necessary in order to build the example.
-               For more information please refer to the documentation for the compiler you use.
-       </p>
-       <div class="changes">
-               <div class="h3-alike">System Requirements</div>
-               <input type="checkbox">
-               <div class="show-hide">
-                       <p>
-                               For the most up to date system requirements, see the <a href="http://software.intel.com/en-us/articles/intel-threading-building-blocks-release-notes">release notes.</a>
-                       </p>
-                       <p> For detailed Intel&reg; Graphics Technology requirements, please refer to article <a href="https://software.intel.com/en-us/articles/getting-started-with-compute-offload-to-intelr-graphics-technology">Getting Started With Compute Offload to Intel&reg;  Graphics Technology</a>
-            </p>
-               </div>
-       </div>
-       
-       <div class="changes">
-               <div class="h3-alike">Files</div>
-               <input type="checkbox" checked="checked">
-               <div class="show-hide">
-                       <dl>
-                               <dt><a href="matmult.cpp">matmult.cpp</a>
-                               <dd>Matrix multiplication Gen kernel implementation with the flow graph interface.
-                               <dt><a href="Makefile">Makefile</a>
-                               <dd>Makefile for building the example.
-                       </dl>
-               </div>
-       </div>
-
-       <div class="changes">
-               <div class="h3-alike">Directories</div>
-               <input type="checkbox" checked="checked">
-               <div class="show-hide">
-                       <dl>
-                       <dt><a href="msvs/">msvs</a>
-                       <dd>Contains Microsoft* Visual Studio* workspace for building and running the example (Windows* systems only).
-                       </dl>
-                       <p>For information about the minimum supported version of IDE, see <a href="http://software.intel.com/en-us/articles/intel-threading-building-blocks-release-notes">release notes.</a></p>
-               </div>
-       </div>
-       
-       <div class="changes">
-               <div class="h3-alike">Build instructions</div>
-               <input type="checkbox" checked="checked">
-               <div class="show-hide">
-                       <p>General build directions can be found <a href="../../index.html">here</a>.</p>
-               </div>
-       </div>
-
-       <div class="changes">
-               <div class="h3-alike">Usage</div>
-               <input type="checkbox" checked="checked">
-               <div class="show-hide">
-                       <dl>
-                               <dt><tt>matmult <i>-h</i></tt>
-                               <dd>Prints the help for command line options
-                               <dt><tt>matmult [<i>-v</i>]</tt>
-                               <dt>To run a short version of this example, e.g., for use with Intel&reg; Parallel Inspector:
-                               <dd>Build a <i>debug</i> version of the example
-                                       (see the <a href="../../index.html">build instructions</a>).
-                       </dl>
-               </div>
-       </div>
-
-       <br>
-       <a href="../index.html">Up to parent directory</a>
-       <hr>
-       <a name="copyright"></a>
-       <div class="changes">
-       <div class="h3-alike">Legal Information</div>
-               <input type="checkbox">
-               <div class="show-hide">
-                       <p>
-                               Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
-                               <br>* Other names and brands may be claimed as the property of others. 
-                               <br>&copy; 2019, Intel Corporation
-                       </p>
-
-                       <p>
-                               THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-                               OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-                               WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-                               ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-                               DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-                               DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-                               GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-                               INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-                               WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-                               NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-                               SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                       </p>
-               </div>
-       </div>
-       
-</body>
-</html>
index 1fd5919d6d415b78e5d1ce3e3b2be64cadd50dd6..9bb927190cf399e2f27a6271c337b7082f7eac6a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 NAME=som
index 97a228b26f9a7ed9357d490c183e373035313e9f..5473785787f697b35397ae97a0101919175bbedc 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index a0b4cfdb00d7c81d1e065c0adf789078a442370d..ef79c475dcfea6e55c98da2ed9ac4b98d363ade9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index f14b651485b2e9a37567b16a21b0c7e31c73d373..3afc6fc48c3d36be0ad9bd1e25f7cc9e9c0afbc2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index 771ef862c6e2a21ab31c3ba48be19789a5500ac2..2397a73e07dedf5717d5e3b03a1735839c686fb3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index 8d60c0605bb7eeb0ca2b2649d8021bfae77258c2..bf9ce64d4be7189694bc4a79490b18f609845f3f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index d8243bcccd34260a9e93198310037444d4d43790..e65b3119a9638eccbf0f25959329385a6be69ff0 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 63cc154afca434bf552422dd38c600d1a85b9c79..f9eef07e20a28e8ee90a439184246c2b48a1d549 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 __constant int redChannelOffset = 0;
index af9c3f54f0557a61847c36e2a9a093e36ed43e52..a0125c23e5d47d510b2f9309012f03558f442f5c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index be8d06ad3318844f576870f20be33faa6d1aa11f..532aa2519593b77e6d0f288f3a83f9a65e60bdd1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index da33477563026df237a5f61ca3141b39067a95ec..aabf678b456261b3c2665cb252a58b69829eb232 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_FLOW_GRAPH_NODES 1
index 14bcd212ddeb7e0048105c9487e91d4ee6d0e475..220d35085b79b301cbe491d79dd5d6354b268bfc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <iostream>
index fd9c133404f13343ba84080a6db10b7d340ef02e..57428a4ea5d58bcb7821265fc9297256daac3f86 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstdlib>
index 0eb63c0b6450c353d231d4ca65a4d31907eecd64..fe1918817dbb6b6c035b8acad41fa5a4abe81a12 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "Matrix.h"
index 0e84694c871b4d3f79e8660a147b10f654f9f395..ba9167664337f8048c1ca072adf21775bba1b23e 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 8c056d8528b3a4e7748bda52f76a4212ef5b1f56..e1228dbbbdd73af458e7152e35bccf642f7149eb 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 4ca1180ec780fe4a071da57d060bf0569f127e60..daa40984228576d7dbd698c01328a9fb25702403 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 class Matrix {
index 4b358218da57b45b17b1703af0cd1df7089ca7b3..d96f8f582c1cf4c4889215bec99e57c14fc5f262 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Example program that shows how to use parallel_do to do parallel preorder
index afe10479e45a45d929a4bf6b3caaf9d641aa3e3d..011cb8ace68312e26baa41e18133320563e36073 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/parallel_do.h"
index 630d65cb7e4ba8a9e2bc355eb1f7e5d09d634d22..9ecddf284af0c708d6778aadfd5a92b945227a22 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 5101cde586e928489bcce0e519eadb543242e749..910832b0452182ca76ec8079f42b2dfb8d0f459a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 2aecf2914f62b5d3b4e5874bfa11b63c9cdcb7b8..981c0fac9eef495bccc52970f3e5569eed80f14c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //{{NO_DEPENDENCIES}}
index af07dcd9d913c383f536fa62bb1ecabd91c1ed95..bd8fedacc0cfe59bb3a6585fbcae9553af707b0b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 using namespace System;
index 7d4ace77f8e7e854793ed7138801f9b2e354f6d3..6873b3172628a5807cfbd4dd78dbe58fea2353e3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __BOARD_H__ 
index 94290a4f22559e06a8665d04b38da5a121a04d42..75fb1e540911cfbf57e76f7c5867d4f88797b9a4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index a7580d0ec52cc1fd41b578430d6fa66e122c896a..ab6f07617aba9a036dbc8d8a6404daad3cbc3c70 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /** 
index 0fa729bf3c9460883cf78cb828c9229be421c8a0..3d956cdf308f57f8364b07fa44b33d66e334fe6a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _CONSOLE
index dcf3238cbf95bfca481018ea8955fae96935b250..43dfc100b8daa9acdcb48c2704f2bfbd0d3287ff 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* 
index 32c2ec5761d7934111fca9bbbc29547df871f5ea..ced86def7533db36411dd375c5387152a6b2c4c0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "Evolution.h"
index 829b91ae3269f6356b719c794a68738d38ee58ce..de4c66f62d065494a9ba6d20e02f5b25d0727c08 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 NAME=pover
index d47d97fbcb745da3e03af5fac35515cd61038c79..d0e46ea6bdd9824395c6a4e792c39d83dbca4027 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 4efef27161fd6acd2ef94a8a269928e063ab65ec..80be685c4c1beab702dce70ac84f02544b838653 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //{{NO_DEPENDENCIES}}
index 4157c5dc7bd76b2c6cc422b023ddfc5ba85b65c0..c996e1e6f6d7f1b4bc45570a93484296c3505903 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Polygon overlay
index 8681e1846dbc94dc84d018399510dd4a8ade4f76..6ab06bb5c6b65a9005f5915bd9ed406600478d26 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "pover_global.h"  // for declaration of DEFINE and INIT
index 25491f5d48234eb3e1b3b5071ce1d020e880e4b8..62a7b8a627dff7b0d16425efbb2c5c308f3db7be 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Polygon overlay
index b30231f0a77e851eccdd9baddda71601383e22dd..ddc09ff25a92c7d0dccf4b73cef07ebd805d3e5a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*!
index 322e08bb63e456d95de19720851f5173391d5198..17ec5c87d926228e29674d12cf4792f41b45de5f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index 3b9fa7f93455138d88452dc187d9ed5a529f452a..15cd4505c946a5fcab7d9e817f878f46cf0947cf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Support for GUI display for Polygon overlay demo
index e9487af4a842b5feb4a8c9ef242eb31c045b4077..e291636bd41bbc903f4448e5596eaa5753256efa 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // support for GUI for polygon overlay demo
index cdac720b3da7efaefad3d1183903027776c7fbf7..74933504ab2aa234b766972c6b4c59a513313ea3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // rpolygon.h
index bc5e0c321370c99223acb20e41280c92ad9b8355..b66999da77c23ced74872c40ca4240c9cbba4a28 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 NAME=seismic
index cac85fa320449dcec3ee779535dc2d9592371bc4..8f26923221c1c6b8939ec3f3d76e787edc44cc1b 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 89ddd29507dc444daf668e0f388bfa8b22b01348..56059f31f764848f3b685f9b0033006ff8c978f7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define VIDEO_WINMAIN_ARGS
index 977bb9949f2a4da50f651e9de9657955d595b368..9553171d9ce29af1d53514ba5f761b51b423e9e7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //{{NO_DEPENDENCIES}}
index 9f624ac96e548dc792515530a2d458d7511ad9f5..e19d705cdf2e36306b2c2afbeaab63e2aa2bd101 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "seismic_video.h"
index 8d3932a891f1354b61218bc99255366398d3ede4..840aa2bbc32cf1f7c2b2adc9f12832e77f0969fc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef SEISMIC_VIDEO_H_
index a84bb537e59cf2f279f16b4aa6e2b52e4d082895..5411b9b1ae3d196e48ba9aedbec4a532847f2734 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "../../common/gui/video.h"
index e62f2a77788351a2ead96b4b1f7730d56a553e81..dbbbd4dfc34d507277272e8214a78569c45a7f4d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef UNIVERSE_H_
index 5ad8c2de5e834df6bfb20a804a93331984af77b6..9451b809f968a25a5ac6e9f09624bbbc805862a1 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # The original source for this example is
 # Copyright (c) 1994-2008 John E. Stone
@@ -52,9 +48,10 @@ CXX=icc
 endif # icc
 
 # The default runtime arguments
-export ARGS = dat/balls.dat
-export PERF_RUN_ARGS = silent dat/balls3.dat
-export LIGHT_ARGS= dat/model2.dat
+DATASET = balls
+override ARGS := dat/$(DATASET).dat $(ARGS)
+PERF_RUN_ARGS = silent dat/balls3.dat
+LIGHT_ARGS = dat/model2.dat
 
 # define name suffix
 SUFFIX = .$(VERSION)
index 776bedf628144f2326f6fa2f3a2a20ecf839c153..3d8c97cab4034ba5cab09d99767a22aa1e12e9e2 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # The original source for this example is
 # Copyright (c) 1994-2008 John E. Stone
@@ -63,9 +59,10 @@ ARCH2 = $(ARCH1:intel64-=AMD64)
 XARCH = $(ARCH2:-=x86)
 
 # The default runtime arguments
-ARGS = dat\balls.dat
+DATASET = balls
+override ARGS := dat\$(DATASET).dat $(ARGS)
 PERF_RUN_ARGS = silent dat\balls3.dat
-LIGHT_ARGS=dat\model2.dat
+LIGHT_ARGS = dat\model2.dat
 
 # Add these for tbb/tbb1d release builds
 # /GL is a workaround to prevent run-time crash when built by VS2010
index ee6e50e5238ad72606bbf55747cbbe8a36f25c2a..007c59f93db65ca04dcd3598f9a205e6f21bee06 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define IDC_MYICON                      2
index aa0f1a80d2eef67bdab31aabc3707f6be640ec16..733c9a619c3a34a53d129411e7c659e47a73e242 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "DirectXPage.xaml.h"
index 66f8ef83555514cf64bad9233920fe6b1193ff6a..eaa4575c52ed3989eefe8c0b54a15481fd458792 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
index bf5b6b67daa8f79a71e9d9e01e084a3bfe6a5e5e..921a3599cd6fad83dbb40c9bf17cf77f345ed78f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "pch.h"
index b46a567d352f8fd66c4e85549ebbdf679bb4839d..1ea2b88d81649e53814f916e468c6df17efc356a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #pragma once
index 93784afd2d856944ac5d7ba516aa46a5420033a9..f9a6fa3abd98c4bc8a142389ed95101032a111a2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
index 0c2a9bab7ed8a66292638d4b0febf687ae20998e..d1a9fc0ccda98f2ccc85f81d2cd7099c9151cb81 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #pragma once
index a47d63b255fd4820d1af8dc46cc982eaffabcd76..f922a867ddbfc3fcdbdb6af01480d0e8bd6269fd 100644 (file)
@@ -14,10 +14,6 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM See the License for the specific language governing permissions and
 REM limitations under the License.
 REM
-REM
-REM
-REM
-REM
 :: Getting parameters
 :: Architecture
 if ("%1") == ("") goto error0
index 1a5d04676a53c139e0b6740614a5a18dce3fc46c..d63702bde9a3dfffa56d0dc7384ab7cee75ebfd6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #pragma once
index 9ac4206712fc1b0dc1f14c5f77ccca53860a8d06..2ad770323c52d64b8584f5c2a5ef93ec35b97668 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "pch.h"
index 17d77364d7bd24fb937dc3611126f9863e9e8cc7..a0370dbda49a2cc58f7cc6b0acdb34294105fd55 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #pragma once
index d6bd6c0cccf799ed8317ddba7286847346181882..3988bca587a88b8334c28fc40679b5d819e21d46 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index e581a0fbdea8c218bcc8fec4f57fdb425b13e59d..3627fabd5b10caf87f6811ae04c8c9cea9799d1f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 2dc0f6ed3bb1002138754e47f5e993483b5d3211..b1bc92cb3dc9ab2ef9dc393a0939c59d12f38416 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 87304f822ea7402f7208121c69b146082323c3d6..8b5be0559640691f0adff153808088b18152bf36 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 65acf1fb381e207dadc7b83253b85cc7fe0885ca..395a462ea181fe9e88fee774203bcf9c1eef5ec8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 635426b19f7001fa69f193c072c467655eacfd0d..5f9c2f7d4ee0d3eb7cde9a8268af5983ec5ca659 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 1046db053860d728a4932c99634388c7c9d1e426..c20d8403a42bcf0d38394a528a7db8ff6ec695dd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 4ddf35668492f86d11f46788faa1d7870928dbb6..b7934118097e49e98f83c85cee1d5be7638c4e3d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 002ff3be1fc7045c55992e84e1db00c4e2a4248c..3bde17829bc58d56d1a6986dd27dbecf59b76e81 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index d49c5429359d3a53cd951eed42221c537bb98e7c..0388d6da66b7222dbca70f77e9ca8d6aa532b01b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index c74058f94d1acd01edb9f1434600c1bdb0d0f993..68572d893f2c425b58d091fcc5ba2d57c0341276 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 8c3e76a438d77ebdf8f8f2462f8e1e5696e79622..f2abf89d90e3367192eb1c47e310ebbbc66033a9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index d4c5913f84113db4b4169b7c37ef4afe65ae64fc..c5a95123c47b5fb74067e5932597647463e05db8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 4d56ece8180f4a15f9f9a67b37ddec4dcfbe1788..c063b13c7381aec2e5d37eecd63df2ceafcf8ae4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 7147f9af731564d6b5e866e1bb1bc92639d531fa..6301047831353891f4e05586bbf6b38113b8ea56 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index c52d3442e00b2fcc29db6894e9a1fcd7d9ce34c2..fa6981c652e5067b76b34fc57e40d071c42234e9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 1e5b17ce5727b57eb42b37ad786b0a53254bd634..4f15b0a40fe582db07c168a465aac0bbb6c424c4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 1c9c2c6336064a5d2ab87d4309b52f8d716ce956..56217cb9695decae516846e782d73896e1b61b91 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index a30657627640cc4a81cf8b4d05f5429b15952777..f29a993a08bfeef50aa1639fa9c3a9ec492b6023 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index e9580e53257fc318c1c4eb000cbc0c5591c04253..87baa0d7313204acee1d909e1bd161a9f9fb7ddb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 84ea0636bf5f4f93a12b05aa33965b276d3b8df8..1dcb6033b81e4bd10a5b6cde82b6327d6f3765b0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index bbfde63578e4bc77095839615455470d8f09e68a..f3ab66101214098edd6e8eab7d7d0678731b2994 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index e8e2bc267cabe90cea8cfac6f3d7b30c45345022..1f2c5cd285ead8f1788b251130dece73826075d5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index ce2d9c3837b18da7e59d8ed6d83f32fa2ebf3df5..4e4d69e1c40c0243d83588d9fdb025605ca744f5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index db6ea814327e60ef95ad2b17a9dea7226ac14522..1e8949d28067108ef49b1e2e7b41a9ac00ddab14 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 04de46c4c2789a4c990b509ff9e0b36cebe3247c..4479b2d5d98b8e76fab4f143585900968eb3cf0c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index db47db9e17b58dd944624b94dc750a4677fca808..e098a1cc4ef8620a182e51134adba42e7f17e709 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 3772645187b2933e47dd80cc6c122c3736d8c49d..24ca8055c2bb8b474c8b13525afbbf7ddea7876d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 60f4b70da53c1fc1d493a60b4061f0d138cb57f4..e521c361957ecd68d987d2e3535fe3cdc05194b7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index fef05f33183c033504cd6aef67fd0272c6f448b1..5d64b1f3dd52667e498f793d19c2dc4012b5e44c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 3429a2661c3459b087e67aae47bc5f52669ea83f..b460c327ad5a49a88e75bbc5510f74c3c8fa2d44 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index b688f63c0388c57813bd9abb2d0d07d4e64e0796..4f9831cf8b077ad0e35426d3ebfbc20168e888a8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 0f006249c2fdf1d9e97fef00e7ed7037b12f5500..947b1038a60dfff2a91bb0f98ad19bd742f996fe 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 9a596ac90cd56de9a4a12da69464f1e3957ccc7f..442083eadec614e83a2c83da19f30d97c6c489ed 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index c9fe7c4e1211ae0f3b52e9d9b5a7c9af2c969433..2a7637b3992ae538b28fec98eb45d5285eef7be3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index a486288065a71f93ac8c6da253a64e42b5f34ab1..af65ae04807a764632726cd91adbb00e5835e817 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 8b59c8575ae14978b1d1a3ce2f8c5a3bb18612c6..3d6a945ed7c5f2df7c0f7ba82cdc1fe6362aa91f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 3e488b43d07c26779186149d4f856f5af2ed4fb0..45411cf06b2d4d9cb4bd524e4215668429ea4d5c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 003238029ecd2fcd77bb1cb3c4b272c1597f85f0..065f6b1f7dfe2e9b82617c5b55b14b347ecbf8ef 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 280dc7bf154f2f6fff85057fe1a141c1658dbe6c..25b3d1d19f11bd165950007bdae0e24b0e2df06b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 72c74f9420d8429153e22386df49525ce0e60cde..4163c2d90c060695fc5c82fdcaa740ea50d31fd4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index b28475f86bd1f51d8a95c2f86a0419636c0dd21c..4cfb71e223458a8f983cb07e4cb52642550d1b31 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index c609e5115bf0806d6f8770376eb29c885d469579..1e1de81c4f7357405aa70aabc84bc767b825e185 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index e08835ab6056a054ca508f489b7c580886ecc38a..0a2eab7cc3a4e52402a0a45d07f88024409f9ddc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 6337a9b76911a6a7c6f8f5141eb96ab91aecb539..e94e0323d661735cbf9dc2b4d5de5675050bbd7a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 9d4bcabeeaf97454ad3e92f6a065cc43f66c9050..6bb4e50e83b70f27f108ceaee06054d0d77ef5fb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index e0d6eef6ac36a94ea7cefcd7f49a523b2f2c5adf..a044cf6974a68156750ca9611fca4e13cb5413ac 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index ad7f733df4b0063d49d13c317d7d8577becb851a..8a80b885377290c01ae4aade2877d6dbcf440ac3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index a7b5c4f0af1b61fa3251f35d9768fa8b07a042a0..1febc66b33f16ad35ded1bed0caa6089710a02b5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index b52c3e01484c428a2cc8477d0e7c3b9725600e18..58a6e57e65c44b17d2b767563e8fe39790b53308 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 8eff1a8cd2100ae29ce1b4612acdda93f28e0ac7..64543a7d5acc18e23bfeacdb6286631e444e3e91 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 2bf5944fe998b297a8f50c45ac78921b187f827e..154d7ab51eab927f87bebe47acfdc6193387742c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 24a1c21380655e4a1b8d90837f3e1cf38863cacc..b94d072708c12db45b835d023d0d9e25164957e9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 8d43c2cf951e44456b4fb83206bb537eb901b5b7..5d1944d1cf4cd4f43ccfab19f03f64dbe18ce2f8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 0f2d6067a40c6bf952cf24ab5303af4a5a69642f..ba3aec11aec2dd277ed1a9b28068193a23b7cefb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 0649b6537afd12363a7a6f34c2c2ffdef7a1d9ac..1df2fa946e54ed2c0a519b9a9ef4f1d957360867 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 6879eb80ffaf622542f8d46ad859fbe794bd6ec6..836e1b131c513bd913d60b84f467e79e9fe72d64 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 1a221fdb53cd3b9f5976ba609e31e88051b35001..b9cdaf818d134f7164ab009ecc95e47c82c82ad5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index bf55b29faccf2ba23ab80e5b333200a6f26e2803..aa06d2c9bb84f888d5f1e7fc5ba1e48bc878a225 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 0b68802dc2de4461cc3597dc1f87156f96f20072..7eb8d36ea756a17fda30e21267796841a779ae91 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 265718694e3fdc1428910ec71212833f88285b50..4ec556c3c019547043929ac35b49490aa3601115 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 9e6412a305116bc6ba1238a91796cdbee6910773..b84646505e23071adceb6ff7b284d570415f4e66 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index bf849303ea0037999b7e9baae8508f397c3dccb0..ae79ad80bb0b727e06496ab4a2f832dbed89c7e4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index b164dcb4bba34ffbdc6de191d81f53046928d9bc..8d2da92fee76b83ab6342586b2e57164073d5439 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 1dcb85ff5e419e190266ea925cba83f2e9adf067..d5a409bc665b6836b33b2811f6e6a7a719c0e5c7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 20ada17b0cd445567dda524110f4e9d508a5f065..bf9f366121ff09721b31f4391a1de1f75a6d6d56 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index da6c96fdc6250e1b2f9fd64cf0fcec2818161bc5..08f8b12dc4d2617ee311cc956da721a2f6d47541 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 527d01d440ebd79254e1b4aa0c91559930320840..931974612dec4c3056007a2faa1beede3541ad79 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 22630774e017c91c0372701ea4db57af10bd39f2..1ecc72335ec8441f09f31e8ebfe1c9fbe9e3212e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 71d7e2bd4acbafd74ac8dc43148903b995ea2491..6d5ce2b8bda0b41f3ba4a581caffcb53146d8e95 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index ae11c15ce2dfe07a4ba73e43ef2ab1955e911f97..cdf1e3df6814495a4511d4d3c0c78b18b1d56d09 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 5b7269263a4a8abb6bfd53ea442154c813c09a45..cb0c4e30424e4bbf813be2eb4de572109ed6d7c2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 111908ad0b4a9aa4351837cc483a9419ee0338c6..d0ecda52d7b4076e3c95f9cb05debf588d15a3c0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 2f7b2a20bf10c2225d6f7c7df42b56a034d337ae..180509a3332b643eac9d8f1078551a37a8e4c572 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 722b63eb35b5427604d2a919e3930220edec8183..4597cc436165591724f545b925a3171132d8b159 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index aa5f7f68389ed17719b863ca18b343e4e30c6432..8ec2d2bb14b85830317a9e2b32d841eeef9f7765 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 83314970e19e8d7f9c33afe7f0de035d46e2306d..82fd5eb7fa5553b0e8a5d034af0ab170bc8438cb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 92256edeaf6f1e52752f252e707544863a7b5b54..4fcccbbfdcffeef9609a24624211b318183f0365 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 8efec27af7dbd7a1332d49f71a9580aafe1fed8a..5b4858807b94f05387a3d0032663e2a3ee89622d 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 PROG=convex_hull_bench
index 6f11fc10c7850a1999eb49f46625923e5c20f545..a624635604315e24ddcf19fedce5ad4908e1e607 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __CONVEX_HULL_H__
index 43fb99969240006e3c15febb696a598166458638..986497a5b93ca7888f938c2eddb11d0c9dcb7577 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 8f2c7250a066bd6464e2b2926d719451ce1402a7..fbe3ecc4a622a27407132097855e6eb5d4693051 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index db234587d74eeba4848f9343355dc305f49b2915..53cdf2efcbbafb6d747229d4c97a4b9096cbef51 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index f3371f36d08731e7429c7b00a44199c15199ff14..4dd7710f08da0dab62c8066b829c62346f1923bc 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 734225d54e881d25fcfeae31d776c8834ed785d1..a397d006725d6012e9f109dbba03873665bccac8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "primes.h"
index 25d6e17ab302154ebe862035891efadf08509009..dcd9d1c7840b101edc48fe95a8bdae9a9e3df3bf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Example program that computes number of prime numbers up to n, 
index f260dfd3171daae40e25ea62bf27346d66faffb7..023d85b8acea2c0524026d7349568f253ca28c01 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef PRIMES_H_
index 3f1fddd0a636b1fc66c3aa7a45c3bd96419844a7..fe0427c8b0f900766e5b6ae26d7167e88bcfb24e 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 6390335ffecbeecb73755893600f5be3c104e09e..4bb6334dd3b3b0a41a74a0608b229327c70dce19 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 7e0ea8b2b652571cd48849f306575da7018c8021..29852b99ba1ae4c8d4e3fc69c30c8822f2883ecd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <stdlib.h>
index 3a6f6a53ea1d5c80a11ba72151c4793442b81eb1..cb7361a2b5f05f2c38fcd962708d6dd570edf905 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index 37f5238bf2f57f4b0c3cf5720c05ac604fa13ac9..1ff4478f0afa4d80ede2cdf2d42d049ad625d63a 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index 8fba35d2aa84f37d4ea2989dd82d207c42405ae5..f05b3afe545def8159042622ee9229e60789aca3 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 67bd11268bda126ceec95cb6324e3d0f396294d7..db05b3d36a5e739579b4903309354fc9cbe52fdd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "common.h"
index 0da9798741029e3463b2bb1d59d6702cc0b944dd..c614cb7920e95913e21e1267d70fa5a303dfff25 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "common.h"
index 2743f5787269229be07ecd363aadbe740642332c..4fc4b3153e624516dedc13213ada4febdd2855ea 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "common.h"
index 594d98f4edf6caa7bcb10110fac0249f445328e3..61b36a3a44e01003c02727b1e03a21f6d70470cd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef TREE_MAKER_H_
index fce116b402758ed1339e1589cb921724bc546d18..e416cef1fcf2c9856129968c822f84e5e680c7d2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 typedef float Value;
index c4e578383997ceb35115c9b6973cf0b0ed8dea99..8c8fa69e18cb57142a70d1f9f234839e7de0575e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "common.h"
index 3793300a43a931546db20345f5c9ce898b334f23..8639a36cb005e5fc5ac50aac3157e0975f9b7f0f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 NAME=Fractal
index 09cdb335d1caf6aa3d207c681e0491e1d2c76466..232fe414acdaf8f3cac06cfc40c07bfaee5c434e 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 715eacc27180c45de45d5acf2bd2d211528b8701..3a0686d9a64beeeda5d5f46e864d626e771e17c3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "fractal.h"
index 7dc0abace7863cbddf703f27a10899fd5c4b8563..0cdd9c5da5ba596a89f1e1b186139f91ef5e4a05 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef FRACTAL_H_
index de1e2c442061a1459799226e4e433f434c262782..7b340d6c6d38e38cf4f7ad6fa27e7a2825364421 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef FRACTAL_VIDEO_H_
index ab03ed984b1a5fa664d4b2c540d0aaa42afb0a56..8f2eb347d173e87ecfee03bd9e1d5fdb9c1a4845 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define VIDEO_WINMAIN_ARGS
index e52a401445f667917ddf19b52607095af3ec94da..78011ca463ef9533129de64cfe29aced7d7d9a27 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define IDC_MYICON                      2
index dd32a48a4daed9e69f2f82b5c8fe1944c914632e..cad72ac60baeb32319134a6bc1d1d842c4c3f578 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index e0b23ded3d267995877af6c2fd7c28fe3f14a2c9..6b4348d7aeea1ef52adbbda0a57c5279f569c60c 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 328339a84547d023238bf158db271ec574e3e38c..2948fc4aeab075f1b96b1673951f131bef8d413f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "../../common/utility/utility.h"
index 98c0da8f8db69d70b1753712b6c49159a1e3f361..fbd23b55768d7f9bacf96e5edf01853c14d30428 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Example program that computes Fibonacci numbers in different ways.
index a869f740d0b920aec98f085c534344dee8660261..6c202c79c42236e8ec51c581bfba1b7266111346 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # GNU Makefile that builds and runs example.
 run_cmd=
index ce825bbea9e34436bf8fbbbeb19e37fef644d1d8..672a14b9efb5a48fc56105d82127b9dd4b2500a1 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Common Makefile that builds and runs example.
 
index 3c8c34801c49d6c46f03b313d52488cacd6f1641..5b42a67086acce4003a09ecbcec455bbcde7b313 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_SERIAL_parallel_for_H
index c3b33065ff50f0c52feceade14c512eeb960cadd..6b79be2d01d1afc878954b7e3d6acbefc2f75344 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_annotate_H
index 197d6ea98bf4f5665b620a0e8520ff8594de2b57..33e83679e76709e47b9c6ea84dd8ca265fc2db46 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__aggregator_H
index 49497c188f89fa428fa48ce341fee556d1824249..03b09d0981ba4e34a4ee862d9872150d577d2d44 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_aligned_space_H
index 9f79c8f5ed7ceb2da40f1f57ecd54d36956309d1..92d1e11ae4f612664b23965b2e2bcb8c9ef35985 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_atomic_H
index b8fcadc06176a064b297f7bc9b33dd68b5f267ce..d1ff1f4592c6bd3a9d5d0591a0e20b896e69aa82 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_blocked_range_H
index 81502cca5f2028be2600a3a4b0d907b9a898b93d..cd0fe1c3f80f8586011d533d3d11959646b4924a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_blocked_range2d_H
index 263f01891c57d55371a14b2cdbf3fdcaee529498..5c6cf9f0e80744434f5e71dfadf184d5a1e733bf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_blocked_range3d_H
index a4fb6588eb7dd5f9e4931a1d5c2cb4e03b5495bd..b623d0021ebb03f020657af4acfe9db0ad506366 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_blocked_rangeNd_H
index 20c635041b87b68a51389df0b8f0f5f2a92fb399..3a00e03588296297d9bb49e746f567d5d5ff01ea 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_cache_aligned_allocator_H
index d9debb9bc858a59fba52ad4ab56d208a926255ec..a8aaf61cd41f2c3242d7216ab45f843b859213c2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_combinable_H
index a46ef6fb1eb35c8573a04f843a24f41be1ee6555..8dc4e913378bfd138e36fdf7700e441fda031a18 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_condition_variable_H
index a0a072a8addca733a88eae7718eb0c6dbcbc08a0..a134244af33021c953acdd7b54a4390c75339f74 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_compat_ppl_H
index aac4f0959b50ca743b89cb2db98567341e59444e..9dac4305979232b04b1551df572097408ec68f57 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_thread_H
index f696714bc8c4146965cc733d129b24e61c6cff5a..86e6cd9f9cef33f5613a8ba03d09f4c6c1848485 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tuple_H
index e7b1067b111b42c427c19936459a363bf75e35ed..e3f2a4010598046f3de70b9458c7408979279f6a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_hash_map_H
@@ -315,6 +311,25 @@ namespace interface5 {
             for(size_type i = embedded_block; i < pointers_per_table; i++)
                 swap(this->my_table[i], table.my_table[i]);
         }
+
+#if __TBB_CPP11_RVALUE_REF_PRESENT
+        void internal_move(hash_map_base&& other) {
+            my_mask = other.my_mask;
+            other.my_mask = embedded_buckets - 1;
+            my_size = other.my_size;
+            other.my_size = 0;
+
+            for(size_type i = 0; i < embedded_buckets; ++i) {
+                my_embedded_segment[i].node_list = other.my_embedded_segment[i].node_list;
+                other.my_embedded_segment[i].node_list = NULL;
+            }
+
+            for(size_type i = embedded_block; i < pointers_per_table; ++i) {
+                my_table[i] = other.my_table[i];
+                other.my_table[i] = NULL;
+            }
+        }
+#endif // __TBB_CPP11_RVALUE_REF_PRESENT
     };
 
     template<typename Iterator>
@@ -820,7 +835,16 @@ public:
     }
 
     //! Copy constructor
-    concurrent_hash_map( const concurrent_hash_map &table, const allocator_type &a = allocator_type() )
+    concurrent_hash_map( const concurrent_hash_map &table )
+        : internal::hash_map_base(),
+          my_allocator(node_allocator_traits::select_on_container_copy_construction(table.get_allocator()))
+    {
+        call_clear_on_leave scope_guard(this);
+        internal_copy(table);
+        scope_guard.dismiss();
+    }
+
+    concurrent_hash_map( const concurrent_hash_map &table, const allocator_type &a)
         : internal::hash_map_base(), my_allocator(a)
     {
         call_clear_on_leave scope_guard(this);
@@ -833,7 +857,7 @@ public:
     concurrent_hash_map( concurrent_hash_map &&table )
         : internal::hash_map_base(), my_allocator(std::move(table.get_allocator()))
     {
-        swap(table);
+        internal_move(std::move(table));
     }
 
     //! Move constructor
@@ -841,7 +865,7 @@ public:
         : internal::hash_map_base(), my_allocator(a)
     {
         if (a == table.get_allocator()){
-            this->swap(table);
+            internal_move(std::move(table));
         }else{
             call_clear_on_leave scope_guard(this);
             internal_copy(std::make_move_iterator(table.begin()), std::make_move_iterator(table.end()), table.size());
@@ -892,7 +916,9 @@ public:
     //! Assignment
     concurrent_hash_map& operator=( const concurrent_hash_map &table ) {
         if( this!=&table ) {
+            typedef typename node_allocator_traits::propagate_on_container_copy_assignment pocca_type;
             clear();
+            tbb::internal::allocator_copy_assignment(my_allocator, table.my_allocator, pocca_type());
             internal_copy(table);
         }
         return *this;
@@ -902,16 +928,8 @@ public:
     //! Move Assignment
     concurrent_hash_map& operator=( concurrent_hash_map &&table ) {
         if(this != &table) {
-            typedef typename tbb::internal::allocator_traits<allocator_type>::propagate_on_container_move_assignment pocma_t;
-            if(pocma_t::value || this->my_allocator == table.my_allocator) {
-                concurrent_hash_map trash (std::move(*this));
-                //TODO: swapping allocators here may be a problem, replace with single direction moving iff pocma is set
-                this->swap(table);
-            } else {
-                //do per element move
-                concurrent_hash_map moved_copy(std::move(table), this->my_allocator);
-                this->swap(moved_copy);
-            }
+            typedef typename node_allocator_traits::propagate_on_container_move_assignment pocma_type;
+            internal_move_assign(std::move(table), pocma_type());
         }
         return *this;
     }
@@ -1148,6 +1166,23 @@ protected:
     template<typename I>
     void internal_copy( I first, I last, size_type reserve_size );
 
+#if __TBB_CPP11_RVALUE_REF_PRESENT
+    // A compile-time dispatch to allow move assignment of containers with non-movable value_type if POCMA is true_type
+    void internal_move_assign(concurrent_hash_map&& other, tbb::internal::traits_true_type) {
+        tbb::internal::allocator_move_assignment(my_allocator, other.my_allocator, tbb::internal::traits_true_type());
+        internal_move(std::move(other));
+    }
+
+    void internal_move_assign(concurrent_hash_map&& other, tbb::internal::traits_false_type) {
+        if (this->my_allocator == other.my_allocator) {
+            internal_move(std::move(other));
+        } else {
+            //do per element move
+            internal_copy(std::make_move_iterator(other.begin()), std::make_move_iterator(other.end()), other.size());
+        }
+    }
+#endif
+
     //! Fast find when no concurrent erasure is used. For internal use inside TBB only!
     /** Return pointer to item with given key, or NULL if no such item exists.
         Must not be called concurrently with erasure operations. */
@@ -1372,11 +1407,13 @@ restart:
 
 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) {
-    //TODO: respect C++11 allocator_traits<A>::propogate_on_constainer_swap
-    using std::swap;
-    swap(this->my_allocator, table.my_allocator);
-    swap(this->my_hash_compare, table.my_hash_compare);
-    internal_swap(table);
+    typedef typename node_allocator_traits::propagate_on_container_swap pocs_type;
+    if (this != &table && (pocs_type::value || my_allocator == table.my_allocator)) {
+        using std::swap;
+        tbb::internal::allocator_swap(this->my_allocator, table.my_allocator, pocs_type());
+        swap(this->my_hash_compare, table.my_hash_compare);
+        internal_swap(table);
+    }
 }
 
 template<typename Key, typename T, typename HashCompare, typename A>
index e1e1607f7aa26c329276594021f0e5d8ff12d110..c28fb6e23ed4f962244b518ad3009a13fab02ff5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_lru_cache_H
index 75b29fc3384f6fcadb95524b856808135fecf2b9..c5c03999dff96bf507a86cac843bf93f59b69e15 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_priority_queue_H
@@ -28,6 +24,7 @@
 #include "tbb_profiling.h"
 #include "internal/_aggregator_impl.h"
 #include "internal/_template_helpers.h"
+#include "internal/_allocator_traits.h"
 #include <vector>
 #include <iterator>
 #include <functional>
index 3f8ebe5af4ed768c57189b5e1b7f09c37d87531d..be8e8f81725fb626c6503259bd48711f8f5b75ed 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_queue_H
index 5c6dd29f78b08765f692c9a5dcb47267c465e4fd..94c0edbfec26a88d64a834f9d66270ad067ea3c8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Container implementations in this header are based on PPL implementations
index e4c8ef49dbdb9ab44da1049faf08f63fcee6d05c..07161f5e04b04f6d0a82c2386ffafd510776a8b5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Container implementations in this header are based on PPL implementations
index 5c94583292f8b9fcdc6c19ad75e363b65e4a9568..461d4c35ea2ab8004e60bced7f52c5241d00c944 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_vector_H
index 13dc414dde955380326292abdcac8902adc10d7f..ba693b38af57262b3988d84108226df0fa5c2382 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_CRITICAL_SECTION_H_
index d12a17835d240dd0c132135fa5a0c8b47826a8e3..1bcac28d6c7205d64e59103709a00d8abf207282 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_enumerable_thread_specific_H
index 0a5cfc0feab3fb4f25869e47c0d7c3badb301b7e..a52d1180ae506d58fb0339882a978b743d2f9a96 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_flow_graph_H
index bfb1e6bbf39adec67100c5719ddf335909538858..e690f0d3e62514b978f007f29ac0961e36cec2cc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_flow_graph_abstractions_H
index 4a363f8857423553b2eb86a4aaa7b1f44a260217..2c99fb330ec5ac0e88e04d35c5306e224e9b1415 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_flow_graph_opencl_node_H
diff --git a/include/tbb/gfx_factory.h b/include/tbb/gfx_factory.h
deleted file mode 100644 (file)
index d00360d..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
-    Copyright (c) 2005-2019 Intel Corporation
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-
-
-
-*/
-
-#ifndef __TBB_flow_graph_gfx_factory_H
-#define __TBB_flow_graph_gfx_factory_H
-
-#include "tbb/tbb_config.h"
-
-#if __TBB_PREVIEW_GFX_FACTORY
-
-#include <vector>
-#include <future>
-#include <mutex>
-#include <iostream>
-
-#include <gfx/gfx_rt.h>
-#include <gfx/gfx_intrin.h>
-#include <gfx/gfx_types.h>
-
-namespace tbb {
-
-namespace flow {
-
-namespace interface9 {
-
-template <typename T>
-class gfx_buffer;
-
-namespace gfx_offload {
-
-    typedef GfxTaskId task_id_type;
-
-    //-----------------------------------------------------------------------
-    // GFX errors checkers.
-    // For more debug output, set GFX_LOG_OFFLOAD=2 macro
-    //-----------------------------------------------------------------------
-
-    // TODO: reconsider error handling approach. If exception is the right way
-    // then need to define and document a specific exception type.
-    inline void throw_gfx_exception() {
-        std::string msg = "GFX error occurred: " + std::to_string(_GFX_get_last_error());
-        std::cerr << msg << std::endl;
-        throw msg;
-    }
-
-    inline void check_enqueue_retcode(task_id_type err) {
-        if (err == 0) {
-            throw_gfx_exception();
-        }
-    }
-
-    inline void check_gfx_retcode(task_id_type err) {
-        if (err != GFX_SUCCESS) {
-            throw_gfx_exception();
-        }
-    }
-
-    //---------------------------------------------------------------------
-    // GFX asynchronous offload and share API
-    //---------------------------------------------------------------------
-
-    // Sharing and unsharing data API
-    template<typename DataType, typename SizeType>
-    void share(DataType* p, SizeType n) { check_gfx_retcode(_GFX_share(p, sizeof(*p)*n)); }
-    template<typename DataType>
-    void unshare(DataType* p) { check_gfx_retcode(_GFX_unshare(p)); }
-
-    // Retrieving array pointer from shared gfx_buffer
-    // Other types remain the same
-    template <typename T>
-    T* raw_data(gfx_buffer<T>& buffer) { return buffer.data(); }
-    template <typename T>
-    const T* raw_data(const gfx_buffer<T>& buffer) { return buffer.data(); }
-    template <typename T>
-    T& raw_data(T& data) { return data; }
-    template <typename T>
-    const T& raw_data(const T& data) { return data; }
-
-    // Kernel enqueuing on device with arguments
-    template <typename F, typename ...ArgType>
-    task_id_type run_kernel(F ptr, ArgType&... args) {
-        task_id_type id = _GFX_offload(ptr, raw_data(args)...);
-
-        // Check if something during offload went wrong (ex: driver initialization failure)
-        gfx_offload::check_enqueue_retcode(id);
-
-        return id;
-    }
-
-    // Waiting for tasks completion
-    void wait_for_task(task_id_type id) { check_gfx_retcode(_GFX_wait(id)); }
-
-} // namespace gfx_offload
-
-template <typename T>
-class gfx_buffer {
-public:
-
-    typedef typename std::vector<T>::iterator iterator;
-    typedef typename std::vector<T>::const_iterator const_iterator;
-
-    typedef std::size_t size_type;
-
-    gfx_buffer() : my_vector_ptr(std::make_shared< std::vector<T> >()) {}
-    gfx_buffer(size_type size) : my_vector_ptr(std::make_shared< std::vector<T> >(size)) {}
-
-    T* data() { return &(my_vector_ptr->front()); }
-    const T* data() const { return &(my_vector_ptr->front()); }
-
-    size_type size() const { return my_vector_ptr->size(); }
-
-    const_iterator cbegin() const { return my_vector_ptr->cbegin(); }
-    const_iterator cend() const { return my_vector_ptr->cend(); }
-    iterator begin() { return my_vector_ptr->begin(); }
-    iterator end() { return my_vector_ptr->end(); }
-
-    T& operator[](size_type pos) { return (*my_vector_ptr)[pos]; }
-    const T& operator[](size_type pos) const { return (*my_vector_ptr)[pos]; }
-
-private:
-    std::shared_ptr< std::vector<T> > my_vector_ptr;
-};
-
-template<typename T>
-class gfx_async_msg : public tbb::flow::async_msg<T> {
-public:
-    typedef gfx_offload::task_id_type kernel_id_type;
-
-    gfx_async_msg() : my_task_id(0) {}
-    gfx_async_msg(const T& input_data) : my_data(input_data), my_task_id(0) {}
-
-    T& data() { return my_data; }
-    const T& data() const { return my_data; }
-
-    void set_task_id(kernel_id_type id) { my_task_id = id; }
-    kernel_id_type task_id() const { return my_task_id; }
-
-private:
-    T my_data;
-    kernel_id_type my_task_id;
-};
-
-class gfx_factory {
-private:
-
-    // Wrapper for GFX kernel which is just a function
-    class func_wrapper {
-    public:
-
-        template <typename F>
-        func_wrapper(F ptr) { my_ptr = reinterpret_cast<void*>(ptr); }
-
-        template<typename ...Args>
-        void operator()(Args&&... args) {}
-
-        operator void*() { return my_ptr; }
-
-    private:
-        void* my_ptr;
-    };
-
-public:
-
-    // Device specific types
-    template<typename T> using async_msg_type = gfx_async_msg<T>;
-
-    typedef func_wrapper kernel_type;
-
-    // Empty device type that is needed for Factory Concept
-    // but is not used in gfx_factory
-    typedef struct {} device_type;
-
-    typedef gfx_offload::task_id_type kernel_id_type;
-
-    gfx_factory(tbb::flow::graph& g) : m_graph(g), current_task_id(0) {}
-
-    // Upload data to the device
-    template <typename ...Args>
-    void send_data(device_type /*device*/, Args&... args) {
-        send_data_impl(args...);
-    }
-
-    // Run kernel on the device
-    template <typename ...Args>
-    void send_kernel(device_type /*device*/, const kernel_type& kernel, Args&... args) {
-        // Get packed T data from async_msg<T> and pass it to kernel
-        kernel_id_type id = gfx_offload::run_kernel(kernel, args.data()...);
-
-        // Set id to async_msg
-        set_kernel_id(id, args...);
-
-        // Extend the graph lifetime until the callback completion.
-        m_graph.reserve_wait();
-
-        // Mutex for future assignment
-        std::lock_guard<std::mutex> lock(future_assignment_mutex);
-
-        // Set callback that waits for kernel execution
-        callback_future = std::async(std::launch::async, &gfx_factory::callback<Args...>, this, id, args...);
-    }
-
-    // Finalization action after the kernel run
-    template <typename FinalizeFn, typename ...Args>
-    void finalize(device_type /*device*/, FinalizeFn fn, Args&... /*args*/) {
-        fn();
-    }
-
-    // Empty device selector.
-    // No way to choose a device with GFX API.
-    class dummy_device_selector {
-    public:
-        device_type operator()(gfx_factory& /*factory*/) {
-            return device_type();
-        }
-    };
-
-private:
-
-    //---------------------------------------------------------------------
-    // Callback for kernel result
-    //---------------------------------------------------------------------
-
-    template <typename ...Args>
-    void callback(kernel_id_type id, Args... args) {
-        // Waiting for specific tasks id to complete
-        {
-            std::lock_guard<std::mutex> lock(task_wait_mutex);
-            if (current_task_id < id) {
-                gfx_offload::wait_for_task(id);
-                current_task_id = id;
-            }
-        }
-
-        // Get result from device and set to async_msg (args)
-        receive_data(args...);
-
-        // Data was sent to the graph, release the reference
-        m_graph.release_wait();
-    }
-
-    //---------------------------------------------------------------------
-    // send_data() arguments processing
-    //---------------------------------------------------------------------
-
-    // GFX buffer shared data with device that will be executed on
-    template <typename T>
-    void share_data(T) {}
-
-    template <typename T>
-    void share_data(gfx_buffer<T>& buffer) {
-        gfx_offload::share(buffer.data(), buffer.size());
-    }
-
-    template <typename T>
-    void send_arg(T) {}
-
-    template <typename T>
-    void send_arg(async_msg_type<T>& msg) {
-        share_data(msg.data());
-    }
-
-    void send_data_impl() {}
-
-    template <typename T, typename ...Rest>
-    void send_data_impl(T& arg, Rest&... args) {
-        send_arg(arg);
-        send_data_impl(args...);
-    }
-
-    //----------------------------------------------------------------------
-    // send_kernel() arguments processing
-    //----------------------------------------------------------------------
-
-    template <typename T>
-    void set_kernel_id_arg(kernel_id_type, T) {}
-
-    template <typename T>
-    void set_kernel_id_arg(kernel_id_type id, async_msg_type<T>& msg) {
-        msg.set_task_id(id);
-    }
-
-    void set_kernel_id(kernel_id_type) {}
-
-    template <typename T, typename ...Rest>
-    void set_kernel_id(kernel_id_type id, T& arg, Rest&... args) {
-        set_kernel_id_arg(id, arg);
-        set_kernel_id(id, args...);
-    }
-
-    //-----------------------------------------------------------------------
-    // Arguments processing after kernel execution.
-    // Unsharing buffers and forwarding results to the graph
-    //-----------------------------------------------------------------------
-
-    // After kernel execution the data should be unshared
-    template <typename T>
-    void unshare_data(T) {}
-
-    template <typename T>
-    void unshare_data(gfx_buffer<T>& buffer) {
-        gfx_offload::unshare(buffer.data());
-    }
-
-    template <typename T>
-    void receive_arg(T) {}
-
-    template <typename T>
-    void receive_arg(async_msg_type<T>& msg) {
-        unshare_data(msg.data());
-        msg.set(msg.data());
-    }
-
-    void receive_data() {}
-
-    template <typename T, typename ...Rest>
-    void receive_data(T& arg, Rest&... args) {
-        receive_arg(arg);
-        receive_data(args...);
-    }
-
-    //-----------------------------------------------------------------------
-    int current_task_id;
-
-    std::future<void> callback_future;
-    tbb::flow::graph& m_graph;
-
-    std::mutex future_assignment_mutex;
-    std::mutex task_wait_mutex;
-};
-
-} // namespace interface9
-
-using interface9::gfx_factory;
-using interface9::gfx_buffer;
-
-} // namespace flow
-
-} // namespace tbb
-
-#endif // __TBB_PREVIEW_GFX_FACTORY
-
-#endif // __TBB_flow_graph_gfx_factory_H
index 0d474c17a813069136038894a9d2be3b3c1e290c..505720cba5bec316353e816368b9cfc7755265b7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_global_control_H
index 420162e7686f297752ad0b50402a8ea4c75dc952..cece90f31628fa5fbdc146792488d976e35762e9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__aggregator_impl_H
index e0403b4fcba438c28862e8878ebd558d45dbdbcd..272077a6a95eee1ccfdc7ef4644b63060677a5d3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_allocator_traits_H
@@ -47,6 +43,15 @@ typedef tbb::internal::true_type traits_true_type;
 typedef tbb::internal::false_type traits_false_type;
 #endif
 
+//! Copy assignment implementation for allocator if propagate_on_container_copy_assignment == true_type
+//! Noop if pocca == false_type
+template <typename MyAlloc, typename OtherAlloc>
+inline void allocator_copy_assignment(MyAlloc& my_allocator, OtherAlloc& other_allocator, traits_true_type) {
+    my_allocator = other_allocator;
+}
+template <typename MyAlloc, typename OtherAlloc>
+inline void allocator_copy_assignment(MyAlloc&, OtherAlloc&, traits_false_type) { /* NO COPY */}
+
 #if __TBB_CPP11_RVALUE_REF_PRESENT
 //! Move assignment implementation for allocator if propagate_on_container_move_assignment == true_type.
 //! Noop if pocma == false_type.
@@ -129,6 +134,8 @@ struct allocator_traits {
         p->~T();
         tbb::internal::suppress_unused_warning(p);
     }
+
+    static Alloc select_on_container_copy_construction(const Alloc& a) { return a; }
 };
 #endif // __TBB_ALLOCATOR_TRAITS_PRESENT
 
index 2f7c292cc9e9954717c52ec4bc75537f4a70a898..7955a40ac8341f846b3c08643577801045f609f8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__concurrent_queue_impl_H
index fbeb7d46af69ef7779c4ef1b47a5fd1c6aacbfe6..b998072351f2a8917d75e6ddfd96b393c57df0a8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Container implementations in this header are based on PPL implementations
@@ -879,7 +875,7 @@ protected:
             source_iterator where = it++;
             if (allow_multimapping || find(get_key(*where)) == end()) {
                 std::pair<node_type, raw_iterator> extract_result = source.internal_extract(where);
-                
+
                 // If the insertion fails, it returns ownership of the node to extract_result.first
                 // extract_result.first remains valid node handle
                 if (!insert(std::move(extract_result.first)).second) {
@@ -1142,7 +1138,7 @@ public:
 
     void swap(concurrent_unordered_base& right) {
         if (this != &right) {
-            std::swap(my_hash_compare, right.my_hash_compare); // TODO: check what ADL meant here
+            std::swap(my_hash_compare, right.my_hash_compare);
             my_solist.swap(right.my_solist);
             internal_swap_buckets(right);
             std::swap(my_number_of_buckets, right.my_number_of_buckets);
index f7a734a2f42f951f35d243d6881aa2e387e0b5e9..ffb63ce4fea1edeee6c47d5fbe2e7e095e12193f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_async_msg_impl_H
index 45b7f1c5d3be30f0a5a5c5c2f0e179888ae33409..25be5ecb97881152d484ad07d9628cdc22c1ebef 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_body_impl_H
index 62f829d5b0eda27274fd836d5fb0558ec80e3da0..42a80511241e0fbcbac50f322121bd775385befc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_cache_impl_H
index ed1e25cd9ca0b1988d37b854a6f364710c7e548a..2dc5e4c4cf78c465c1d60153c65d22cfd66e3392 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_flow_graph_impl_H
index 28048aa9a017c3dfef8c469e0287bef9ac4ebf52..332467dd5e22487a0e6f8308558799a9157e3875 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_indexer_impl_H
index 7269fa06f468707eaadafaa3986a366a28d0a9db..569545fc9e2a18eca2f85a8222d21e7550fa7b6a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_item_buffer_impl_H
index 755e10327e4bb94eeee219a4b48b33635ac56c50..f7d141247d23c40bf921f81c574688cc6a1f7da3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_join_impl_H
index a0004647f6f6fffe630e95535d4fda8114d25536..215777f3f9dbdcae313550723c0bb04b56188b18 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_node_impl_H
index 6a0f5721705087f05260c4e9fd73c9a63e9cfac9..2a1d43e087bbc4efaa562741e8419be0089218a0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_flow_graph_streaming_H
index 1f3797f317b99f545465ef2d802955cfe429c455..87a32fe604ed47f5c84defdd4abf4df50bb5f600 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // a hash table buffer that can expand, and can support as many deletions as
index 957513d1cc3e1cff72daef2eb9d08398f60b5584..aee40762d81a237872979438bca1d32578025859 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _FGT_GRAPH_TRACE_IMPL_H
index 688f1faa9dba1cb328728caec7b43dc4f6c8a6ab..01e8914c71bd0b9b1bc7985c6e4b561186b3cda8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__flow_graph_types_impl_H
index dcf940a08129c4b07b97e5a18e347d188a3602f8..09fccd44ba45a53538f8917fbe1a39ecad84bc98 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_mutex_padding_H
index aeec1906c1dec2706354473b12db06ec0c021f54..733c795f463b2ff4e5bf1f94e6950fa884a89073 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_range_iterator_H
index 098312dc2aceaad8fc7dc9e1adc6b67987dade50..510bde324ce666b1595412f2ff1ba3bb305da683 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // must be included outside namespaces.
index 049a6b934c6015c28428bb9d07f863c38865516b..a5fd3ce5a7dac95081e3fd10ea1eb8c08f1d07b5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 TBB_STRING_RESOURCE(FLOW_BROADCAST_NODE, "broadcast_node")
index 964ec5a9a2230e19c3a07864b5e1c641979464a3..e89ab23241fb098f3d033152ccfa63eb3bc85325 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _FGT_TBB_TRACE_IMPL_H
index 9a5eadc2522d7bdb8144f5973703411118ffa1ed..7fe8df428c0f823c5eeeb5be9bfe2a7915fa38b6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_windef_H
index 6a299bc7f35e59c3f8b210fdff42771f40ec867f..ea425a1409477faf39196cce008acde8d89e87d9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_template_helpers_H
index 52b0cc0b08a60291d4a7b6caaf4147507341d466..a03e463fd4de914da253ab8bdbff411748a0eff5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__x86_eliding_mutex_impl_H
index 066704da018df79f41d88c58f77855e7e282bead..0003abac9f8b3adb4973790e5a26e25238faf18f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB__x86_rtm_rw_mutex_impl_H
index 56107b0d053c8265164aeac4c593405c64f99ff8..e834b480750bace132e7b2cf9030b9c2074ed370 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_iterators_H
index 3a67fdee14e088efd5b85da0fb9cf672d7f5563c..40118e8740f71e0fe78852b6beebb4dc3be20b26 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 740cfd3d09bb9288f970a838a265df6ffd60290f..cbf8d99324d7a65378bcecceefe0e0af29e8a7df 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_generic_H)
@@ -216,9 +212,9 @@ struct machine_load_store_seq_cst {
 
 // __builtin_clz counts the number of leading zeroes
 namespace tbb{ namespace internal { namespace gcc_builtins {
-    inline int clz(unsigned int x){ return __builtin_clz(x); };
-    inline int clz(unsigned long int x){ return __builtin_clzl(x); };
-    inline int clz(unsigned long long int x){ return __builtin_clzll(x); };
+    inline int clz(unsigned int x){ return __builtin_clz(x); }
+    inline int clz(unsigned long int x){ return __builtin_clzl(x); }
+    inline int clz(unsigned long long int x){ return __builtin_clzll(x); }
 }}}
 // logarithm is the index of the most significant non-zero bit
 static inline intptr_t __TBB_machine_lg( uintptr_t x ) {
index 921f00fc2ca1383f18dc5cea64e0700d37f7a49e..be572bb75b1cffbe81a4dcdbb4d3068cc994e58d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_machine_gcc_ia32_common_H
index 1b7a962be02cab9248c0e84be541f6cf5532d105..5bd400e5cd15e7f037627b0e190b6fa9dd0c77fb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_itsx_H)
index 229eb44bf7cf42b2f1d299e5b8a71d961b800ab2..14ba4d9fc999372476769d73b8d7f4d1eaeb9c5d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // TODO: revise by comparing with mac_ppc.h
index 33f6c0a9126daf875f4e874bdf2778f0c9a1e71a..00af78a782475a218790a3b8c0fb2b5820992b94 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_icc_generic_H)
@@ -23,7 +19,7 @@
 #endif
 
 #if ! __TBB_ICC_BUILTIN_ATOMICS_PRESENT
-    #error "Intel C++ Compiler of at least 12.0 version is needed to use ICC intrinsics port"
+    #error "Intel(R) C++ Compiler of at least 12.0 version is needed to use ICC intrinsics port"
 #endif
 
 #define __TBB_machine_icc_generic_H
index d80384535cc5654fc5bbf780df2c6dbf381d8464..6f93828d665fcfd7ead2b9539d492cc69f728b96 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_machine_H
index 99dd2b679a95251d39e97758cbf01d59b6ef3d79..6e2543c7598b7908e2818486a8017b7b5a51db12 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_ia32_H)
index 739f97186fa4a0bbc8436d30c0b699461ca6e56c..be9676e1cabf5587b56b0716f929ce1d006e6622 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_ia64_H)
index 8572e5db1bda058124d2adb22e12f9d43ff4b6aa..d0b15bed1870c11ba876dd2f45468f1e5fd401cf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_intel64_H)
index a61294cf710ff67e685465e2ae6f9ee5f1e6b135..0c07cc99f2b5ca4101efa845a3f1bc20d5d49788 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_power_H)
index b73f7a198ed08d7b5aeec83ee00d11925e031146..c63536fae5dd4880289a1e6b616f3c4c89f0827d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_macos_common_H)
index 6edd66cfeb5cedd7151c8979c5622df6d036a7c1..afe08331040a7d981da0638717fa8d098b2cb0f7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_mic_common_H
index 402492a5844f19ec49d46dda56b16c5635c7953d..d38ceb9cf4d2c24fb6b39ba724b02112045804f0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_msvc_armv7_H)
index 8a9857123f3fb9056c459cbe0bfa316c3a624ca5..541e1fa9661956a8993ea8b34a066ce6533e9066 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_msvc_ia32_common_H)
index 956499aa8d756813e960e7b36e7ad201a80519d0..18e68c34fd9f4290b42742ede5c5917284dd1d68 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
index 90c6156d90a7e52204e2408194045bfd1e18610a..abf0e182a1ff0afa1faf9b4916ddb14d63062185 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_machine_windows_api_H
index 0b1e7dd09b4273d54e16c99b97c368a3ebb1a626..86550a7e002ecc3c38441dd939492be901a38b3a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_ia32_H)
index 46365b65cf2715ed2d47b090bbe93753e8cab075..6b733d201899f84fd80f8902f11df77ba0ce6961 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_intel64_H)
index 8c09e03225813f3eaf9ef2142719ddc14cdfa72c..2037d634eda69abccfe3898731f69cede9f14b2d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_memory_pool_H
index 67a2fd23c1972323f27aa0a22ba67f2fd9e0464f..5f461f3faed84999c27c19d79ca1d5c6bba69d11 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_mutex_H
index 11cb92d410a0e6c6db76fcd676d21b212f291426..b9c382dd23821c9adc55f33ce6c7cc2e088d022e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_null_mutex_H
index b37da013e6a9ebfe8ebd0ab3c3f6d2eb65f02c04..d2fd33ca2ad8dd76eb225b38f4aefd17db742add 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_null_rw_mutex_H
index 3e4b3ce3bad8fc7f457c3b262d1e4c4d0f6e73b6..d3f2075deb86a8c94f5ed82a9f4a141a30c9e758 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_do_H
index 8b14976772c24a25df5825b09570e768c72578ac..a682067a493ac64ba7d7c3d2ad01c017249eecc2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_for_H
index 7e9702460bc29259d369e4e73021c60730878395..1ce39ece9d8093e9238203ea80a24b91405d0b63 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_for_each_H
index e3749048f650b649c8722143e46f4ce46f6bccd3..026b445d997656211b02d7322d01a1b94cb87fe9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_invoke_H
index c1c3ecbdff7884cedc61d0c147113eccf8a2016e..9908de9e5b80794aeed81a99f920eaf0fcbd055c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_reduce_H
index 333e08e964aeab2fb42b8d63c03d36ee7f4f0333..7f6478dac3dfbde6985d182f2c48069556d64621 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_scan_H
index 7f20c6f818aa17747e484ce35a89ee74bf2e1d79..a543a6aa145f6c0c2a9fdb426b424f6e94c33d3b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_sort_H
index c954b935569e2827377c9b24f1a7f0a5f0e699d3..0717700551702c882cb458f2bc994414713b1bd0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_parallel_while
index a11a800be3b83ffdffce5049940ad1252c25d916..285ada712b4228ca76a5420bc2e94d8c661a236a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_partitioner_H
index e67385ace5b48a5fe7774e7c109db7d0d0588483..c7138644380e431b234ae25675fc5cb33a79f119 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_pipeline_H
index f3091bb8ca1f875fcdf498552a3aca68554bda33..15f94774a36146a7a0134d3865ef9a5807426069 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_queuing_mutex_H
index 17c79bb0eccfc70f4ca44922f4439231ad90b370..6d5d31300dac0476568b2387ba556e5f30c9cf3c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_queuing_rw_mutex_H
index 232c1c82904b01ba8929691cd85754ab2790672e..2275abc7e4a7c1354539b7e42ef761b6e8bedb8f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_reader_writer_lock_H
index 11badb03d2c9653f1fd35ec8acd419f085a6bfdb..576bd99925ae6338978d866a1a4bcc70372fd785 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_recursive_mutex_H
index dd50ce6ecc01ccec6f084508ea90b640074a8532..a6d695b3c61ba3c49122cf3f3669c0952477bcf1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_runtime_loader_H
index 8e071e55b3d13ec4db25fdf66130eff951e3da1e..d1cf7118103e9966564dec278c981f8f466f72f7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_scalable_allocator_H
index 2bd5c869e4d85a353cf02a6369200d71858e8b5e..e29cf35487022f7ac17fef1140e849b3666973ad 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_spin_mutex_H
index 7b2b4373db5e68eaa1ec47e14904ff2d85ba4cff..1477e684fdc7677ac582e1c70f5d7f26c5e6cee8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_spin_rw_mutex_H
index 6b2fb57d77a0a2ae2ce40464d29496018e70bd6f..8498b209776b06ee6bed0de951e80fb09d037cbc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_task_H
@@ -310,6 +306,7 @@ enum priority_t {
 
 class task_scheduler_init;
 namespace interface7 { class task_arena; }
+using interface7::task_arena;
 
 //! Used to form groups of tasks
 /** @ingroup task_scheduling
@@ -336,7 +333,7 @@ class task_group_context : internal::no_copy {
 private:
     friend class internal::generic_scheduler;
     friend class task_scheduler_init;
-    friend class interface7::task_arena;
+    friend class task_arena;
 
 #if TBB_USE_CAPTURED_EXCEPTION
     typedef tbb_exception exception_container_type;
@@ -823,6 +820,14 @@ public:
     }
 #endif /* __TBB_TASK_PRIORITY */
 
+    //! Enqueue task in task_arena
+    //! The implementation is in task_arena.h
+    inline static void enqueue( task& t, task_arena& arena
+#if __TBB_TASK_PRIORITY
+        , priority_t p = priority_t(0)
+#endif
+    );
+
     //! The innermost task being executed or destroyed by the current thread at the moment.
     static task& __TBB_EXPORTED_FUNC self();
 
index f8e9b857bd601e7a78dee0bbeaede4b49ed5c94e..855634c611f85633a447d77c37eab19c4a094775 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_task_arena_H
@@ -172,6 +168,11 @@ R isolate_impl(F& f) {
  */
 class task_arena : public internal::task_arena_base {
     friend class tbb::internal::task_scheduler_observer_v3;
+    friend void task::enqueue(task&, task_arena&
+#if __TBB_TASK_PRIORITY
+        , priority_t
+#endif
+    );
     friend int tbb::this_task_arena::max_concurrency();
     bool my_initialized;
     void mark_initialized() {
@@ -414,6 +415,19 @@ namespace this_task_arena {
     }
 } // namespace this_task_arena
 
+//! Enqueue task in task_arena
+void task::enqueue( task& t, task_arena& arena
+#if __TBB_TASK_PRIORITY
+        , priority_t p
+#endif
+    ) {
+#if !__TBB_TASK_PRIORITY
+    intptr_t p = 0;
+#endif
+    arena.initialize();
+    //! Note: the context of the task may differ from the context instantiated by task_arena
+    arena.internal_enqueue(t, p);
+}
 } // namespace tbb
 
 #endif /* __TBB_task_arena_H */
index 9874b4fd24d19245d38d9249caf7454433cdce6d..cafde9f2c734eb28bf7045cd8195e30d09bbbfe2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_task_group_H
index 6f363304742464f87dac5ff3a39283634d122c44..66a24086446f80700d0aef781038feef26175e6b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_task_scheduler_init_H
index 5844a68c1ed4066e9ec3c8e34b0c08b850e3fee0..72694af39009cd74a9b3357a8741216308444cce 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_task_scheduler_observer_H
index 39857dba66682b731a5e9c1261d1c6ab3a09981a..5a91808a5fa39e88525c0c58517367194ce5d1ab 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_H
index 3dc6c336405fa4daecbc88f54375cb72c1a2b9cf..206593870cee5d8604e4b12facfbc3d92b11ce77 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_allocator_H
index b3114bdb51942f266a7927a5393bb02a84288bfe..6d83c65ffa3092bc89f097b78b75bcab63907c95 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_config_H
     #define __INTEL_CXX11_MODE__ (__GXX_EXPERIMENTAL_CXX0X__ || (_MSC_VER && __STDC_HOSTED__))
 #endif
 
-// Intel(R) C++ Compiler offloading API to the Intel(R) Graphics Technology presence macro
-// TODO: add support for ICC 15.00 _GFX_enqueue API and then decrease Intel C++ Compiler supported version
-// TODO: add linux support and restict it with (__linux__ && __TBB_x86_64 && !__ANDROID__) macro
-#if __INTEL_COMPILER >= 1600 && _WIN32
-#define __TBB_GFX_PRESENT 1
-#endif
-
 #if __INTEL_COMPILER && (!_MSC_VER || __INTEL_CXX11_MODE__)
     //  On Windows, C++11 features supported by Visual Studio 2010 and higher are enabled by default,
     //  so in absence of /Qstd= use MSVC branch for feature detection.
     #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT            (_MSVC_LANG >= 201703L && _MSC_VER >= 1914)
     #define __TBB_CPP17_INVOKE_RESULT_PRESENT               (_MSVC_LANG >= 201703L && _MSC_VER >= 1911)
 #else
-    #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT          0
-    #define __TBB_CPP11_RVALUE_REF_PRESENT                  0
-    #define __TBB_IMPLICIT_MOVE_PRESENT                     0
-    #define __TBB_EXCEPTION_PTR_PRESENT                     0
-    #define __TBB_STATIC_ASSERT_PRESENT                     0
-    #define __TBB_CPP11_TUPLE_PRESENT                       0
-    #define __TBB_INITIALIZER_LISTS_PRESENT                 0
-    #define __TBB_CONSTEXPR_PRESENT                         0
-    #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT        0
-    #define __TBB_NOEXCEPT_PRESENT                          0
-    #define __TBB_CPP11_STD_BEGIN_END_PRESENT               0
-    #define __TBB_CPP11_AUTO_PRESENT                        0
-    #define __TBB_CPP11_DECLTYPE_PRESENT                    0
-    #define __TBB_CPP11_LAMBDAS_PRESENT                     0
-    #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT  0
-    #define __TBB_OVERRIDE_PRESENT                          0
-    #define __TBB_ALIGNAS_PRESENT                           0
-    #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT            0
+    #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT          __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_RVALUE_REF_PRESENT                  __TBB_CPP11_PRESENT
+    #define __TBB_IMPLICIT_MOVE_PRESENT                     __TBB_CPP11_PRESENT
+    #define __TBB_EXCEPTION_PTR_PRESENT                     __TBB_CPP11_PRESENT
+    #define __TBB_STATIC_ASSERT_PRESENT                     __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_TUPLE_PRESENT                       __TBB_CPP11_PRESENT
+    #define __TBB_INITIALIZER_LISTS_PRESENT                 __TBB_CPP11_PRESENT
+    #define __TBB_CONSTEXPR_PRESENT                         __TBB_CPP11_PRESENT
+    #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT        __TBB_CPP11_PRESENT
+    #define __TBB_NOEXCEPT_PRESENT                          __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_STD_BEGIN_END_PRESENT               __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_AUTO_PRESENT                        __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_DECLTYPE_PRESENT                    __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_LAMBDAS_PRESENT                     __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT  __TBB_CPP11_PRESENT
+    #define __TBB_OVERRIDE_PRESENT                          __TBB_CPP11_PRESENT
+    #define __TBB_ALIGNAS_PRESENT                           __TBB_CPP11_PRESENT
+    #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT            __TBB_CPP11_PRESENT
     #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT            (__cplusplus >= 201402L)
-    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT          0
-    #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT            0
-    #define __TBB_CPP17_INVOKE_RESULT_PRESENT               0
+    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT          (__cplusplus >= 201402L)
+    #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT            (__cplusplus >= 201703L)
+    #define __TBB_CPP17_INVOKE_RESULT_PRESENT               (__cplusplus >= 201703L)
 #endif
 
 // C++11 standard library features
 #define __TBB_MOVE_IF_NOEXCEPT_PRESENT                      (__TBB_NOEXCEPT_PRESENT && (__TBB_GLIBCXX_VERSION >= 40700 || _MSC_VER >= 1900 || _LIBCPP_VERSION))
 #define __TBB_ALLOCATOR_TRAITS_PRESENT                      (__cplusplus >= 201103L && _LIBCPP_VERSION  || _MSC_VER >= 1800 ||  \
                                                             __GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION >= 40700 && !(__TBB_GLIBCXX_VERSION == 40700 && __TBB_DEFINE_MIC))
-#define __TBB_MAKE_EXCEPTION_PTR_PRESENT                    (__TBB_EXCEPTION_PTR_PRESENT && (_MSC_VER >= 1700 || __TBB_GLIBCXX_VERSION >= 40600 || _LIBCPP_VERSION))
+#define __TBB_MAKE_EXCEPTION_PTR_PRESENT                    (__TBB_EXCEPTION_PTR_PRESENT && (_MSC_VER >= 1700 || __TBB_GLIBCXX_VERSION >= 40600 || _LIBCPP_VERSION || __SUNPRO_CC))
 
 // Due to libc++ limitations in C++03 mode, do not pass rvalues to std::make_shared()
 #define __TBB_CPP11_SMART_POINTERS_PRESENT                  ( _MSC_VER >= 1600 || _LIBCPP_VERSION   \
@@ -817,10 +806,6 @@ There are four cases that are supported:
 #define __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING (TBB_PREVIEW_FLOW_GRAPH_FEATURES || __TBB_PREVIEW_OPENCL_NODE)
 #define __TBB_PREVIEW_ASYNC_MSG                 (TBB_PREVIEW_FLOW_GRAPH_FEATURES && __TBB_FLOW_GRAPH_CPP11_FEATURES)
 
-#define __TBB_PREVIEW_GFX_FACTORY               (__TBB_GFX_PRESENT && TBB_PREVIEW_FLOW_GRAPH_FEATURES && !__TBB_MIC_OFFLOAD \
-                                                && __TBB_FLOW_GRAPH_CPP11_FEATURES && __TBB_CPP11_TEMPLATE_ALIASES_PRESENT \
-                                                && __TBB_CPP11_FUTURE_PRESENT)
-
 
 #ifndef __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
 #define __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES     TBB_PREVIEW_FLOW_GRAPH_FEATURES
index 2fe46639cfa49e40c08f2789c3f1b2561c3991ea..88ef43514f03324fa9b49b1609b062013d705b13 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //! To disable use of exceptions, include this header before any other header file from the library.
index f5d571b5d18e7a423f92a39371b2529762f7793b..2dcb62b53ee4d5d5ada5ea4a700d125686bc5744 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_exception_H
index 97242029da21a0baca633ae7c8e2c44b2cc11cee..095b9d3caa7213f3568313c839964eb7fc1eff6e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_machine_H
index 2f212fd5b02d06125979d7c21cbfe4e328f2eb81..21665800e7634038c80ec1a9072a58bc7ebce241 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_profiling_H
index 81f514ae86fd8a34227213803def97bf4ef93e94..ba74e4f77c354edd37a2c3a62de380511f5a6e61 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_stddef_H
@@ -26,7 +22,7 @@
 #define TBB_VERSION_MINOR 0
 
 // Engineering-focused interface version
-#define TBB_INTERFACE_VERSION 11005
+#define TBB_INTERFACE_VERSION 11006
 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
 
 // The oldest major interface version still supported
index 04e8a96983df9563f109562b1ba4cf994c669adf..5a3b5cc5c356515261e7b9227abd4d2c2542fab4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_thread_H
index 7e4b53f8cc6e38cda482ac2e0f7f9d120dec1783..d7b7235a0b7b7ebcd5885a2751fd062c840e2c41 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index 28a0b1d0c80ff1f15b9f93b49bfc1fb3d1934183..a3c744ceb97acb6199b331f0bd756eae4dc4025a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tick_count_H
index 9078195dbc360c6883c913601c5c06dfa259074a..522bc84cce3e3494e4b9f104cfbf68cd9dea9637 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 export tbb_root?=$(NDK_PROJECT_PATH)
 
index cf3241e03cce8e51730cd6689dc4805cfccd2cbf..80ace2f6680abec93c0d2d8bee9cbdc3ec1406ab 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 ifndef tbb_os
 
index e58412ad6d6b4fc46c404e338e42c83b1bef164a..48e20e3593ca91c1ccf1931682e8f8adf0812966 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 tbb_root?=..
 include $(tbb_root)/build/common.inc
index 2cafdf337d38b3fbceea5e2a62e03c4d77408e63..0a20dd0bb3841b7572f7dea16c008e07aa940db6 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 from tbb import *
index 5504d24c95ee7a4eb6140ff67c9364e9db2474e5..2bfaf65c22aeacdeeef52bfb69ecd34118f8113f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 .NOTPARALLEL:
index 6249ac0cae8784f8784279227422f845f71b118d..bbe3a3e1757a8f17adc6dca6548bdaf8fe59ce48 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "rml_tbb.h"
index de6afe4ddea57d6302d42f03d1442cff555e5c8f..c46f68209d85e5febef9f6bf21097b0847337d9b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "ipc_utils.h"
index 5e6b336fb25ab3dd83cf7e5687d92ada6f0e3f0f..92de5afdbf066e32b99db043c0011d272f185f0f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __IPC_UTILS_H
index e281028b69fd3368fd2ce1aa64c734d799cbd17e..7792f6541e0afca7519262defee7f5d7e6b15442 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 # System imports
index 6eddad5afa809a4c65433fa426754bae1af11fa7..728082f5676b28734507e6113a776a78af5a7ce3 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 from __future__ import print_function
index 506430faffca0881028d72c2f014eba5df3a319c..35d005e13b23624470339a475ab8a7e54fe363e0 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 from . import _main
index a923be7ff6fae7ff5b5a23e664e653492ec8616b..56c8e7aa7ee6c6bf585418ce53e8f08c57ee89f3 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 
 __all__ = ["task_arena", "task_group", "task_scheduler_init", "global_control", "default_num_threads"]
index 0ebdff7731692cbe57911ccf2a81ece91b1cec7e..c521f5f2b4ebd34ddb4f91e742ca467cddb58b64 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Based on the software developed by:
 # Copyright (c) 2008,2016 david decotigny (Pool of threads)
index 04dbffbad10fab6d1993b3f49dfa61a620d9469b..c95e4cc93aba18b49655ddbd45f83edbf870ad63 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 # Based on the software developed by:
 # Copyright (c) 2008,2016 david decotigny (Pool of threads)
index a4b685cf05998471aef6309a535b4db9fa2d3295..cd82fe3fec7f0389ec590b56c41ba665c8a826e7 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 tbb_root?=..
 examples_root:=$(tbb_root)/examples
index e1443e7a0cd44dc70730c6e33e74d616ee0098d8..096561c7a5464a6d5b469c477049ee0a5b6ebaa3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "concurrent_queue_v2.h"
index 5bc7bb0647f1b3f477d77222390c112934c83578..a76ae1c09257c7105f8d610de80457ce89c22ea4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_queue_H
index 1a67c8f358c69141b723df61ac43df8f3a9e1e3c..4fe39953a023153ceca15436bb27c388d6bfa64e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "concurrent_vector_v2.h"
index f398cd20dd87bda8061be32a020e760a3a8ea87a..55398734e4d9b39d555669e89aa996dd120bb60c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_vector_H
index c87a8116a9d9ab7c7ba849f04d38ae06a18dd17e..6308c9d8f36785fa3f25981c893b844b7bc97031 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "spin_rw_mutex_v2.h"
index 6fb5e1381cd576dc4739afee8a5df1575f64526f..952f4a11c855571b170e54f202ab53f657e51048 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_spin_rw_mutex_H
index ae9a7e0809cada697b02b969df5e72a57a6ce3a7..073c6789306626252ee60359fc7eb1e1a7424530 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*  This compilation unit provides definition of task::destroy( task& )
index 132713be2aeedca23b9e9fb50b70db39b9c70190..69d29e037906047812af7908d8e178bbbec28b11 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "old/concurrent_queue_v2.h"
index b0bdb585af683b1921b5fb16a808b2bf686fd781..acb198f59142ad1a82f85f50b048ca394ebd520c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "concurrent_vector_v2.h"
index 4c29e25123434205c634d4086ddd4c9fd0b7abd5..99902a342a8a36cf4e0cb0b1c2497b2575bb3c8c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 1
index 440861d5aea19b47b9a6ffab22c979e77bf18707..547f16fd23c90c889111bca42d24ae141f669fbf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define __TBB_ARENA_OBSERVER 0
index c55f2d53115eb62ceba8d1d8f4f9db0f6692943c..556fc87c72071e8b26701fd4a4c6f630a0b9b533 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef coarse_grained_raii_lru_cache_H
index dc64e32f190f9edc5e6bfdcbf9aa9bc03edcd323..2ec842f2f53c8819084e82d3b1a2e638c7360232 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstdlib>
index 7b4b393285c1ccc4b687fc1f6df0e7caebbc8a49..4ef990023efb2e6f993383570f8c58f2de30707b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstdio>
index 4f94dddd6f6eb22ce83bb06c6a3ea6db479ebad3..16e7020ae0ced782edcc609cabe5412ff70f76e9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "perf.h"
index 59885931032dca21e0e3d3ac9beaf220ded51a80..7ea6d397e6e9ed4c6ec59ab598f8022abe2dac73 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __tbb_perf_h__
index be000164684052b4454f35e2ad2674c4a6337b06..cbe8421e03c4d55db18f9dd410f2b12dc87368d2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "perf.h"
index 47d68c97cc22263c53cdf795f9651e11f01a4857..c3048f4c4d602e1d24546c7e17dd458dc4f1273f 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-#
-#
-#
 
 export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
 #setting output format .csv, 'pivot' - is pivot table mode, ++ means append
index 579f3de73c8b46724be99c3d21269c4573a6336f..564dab607ef3615fe92d063c06d86aaa4af7f5f5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "statistics.h"
index 3dec4432cd5fa1cabe8dad02266a02ccca867a54..e384264e6aedda50da7ca4163749e960abb6961a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Internal Intel tool
index 126958fdde0961fd46d6cc62c550444efe07fbfa..7059596dca1d277121fef8051efcd7f862ce1805 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 const char XMLBRow[]=
index 36c5d14d8de196df7bb9180275d6a2f95c43e252..8764bc3b0202f81c32b0a5e254ab282278f0ccb0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*
index c98361c5484eb01dff8ce1f42f8ead7f6b88731a..24376f36b751064bfe7da375d7d382c3d3022304 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_CUSTOM_MAIN 1
index 7c8c33b3c043172a8de4a8f48610f16c190b01de..c5194280435491ab3320de7e6522671441a66833 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstdio>
index 7a37cda391750522955d16b33f1bfc4023ed94e8..ca715edb9e09ffac16a68363cec691bc3c723e63 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TIME_FRAMEWORK_H__
index 1d452dfc6395e8f9dda0edebdb0ffd3dbbb98b49..67041532becff53c480557cab801feaed2435650 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // configuration:
index 08463292d40c3a19e2ceba0d226d96374b2c06de..93d9cc4637320709b62c5c67531831ded0da5576 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // configuration:
index b7b9d63ad1013334ec335410df3226e158e56f90..d09870ed188ed21c34cacb43002230b7a09f634d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 ////// Test configuration ////////////////////////////////////////////////////
index 7bf468a859582403ae3f069471a053f5d72954dc..4bcbf749b9f5d9bbc2dd70f3c8cee379464eb039 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "../examples/common/utility/utility.h"
index e88a7b853f57f9d2eb9af8a5c52cada387b23b5c..55fb2d0df495dde6d6ebb76104c22a59c8d973d4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <vector>
index f882109cc93cee9f50c95745c8a9782bdfad993b..4a905ed22fa4c21db746eb56f22898acb205d544 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TIME_FRAMEWORK_H__
index a973103146bedc2aa43878852c7d2821e07f49da..79cc777352c5bbe2ebda83072281c0fe20cd8636 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <iostream>
index 8329f6abaeb2a85ae4797bd74ff28e5cd20bc66f..c83e66ae26d3fd23d7bd123901850b38ee328dc7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //#define DO_SCALABLEALLOC
index f7d591a6b2bead9fc7a22b86309083162a6447eb..f93e53d574c5eb10399bc53c54e0fa28047c3be0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef LIBRARY_ASSERT_H
index ce72ea00a32724f2c34af1cbc5cdd54a72803eb7..0716f8b566c91ef7c312349923e862929cf6e7cd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "omp_dynamic_link.h"
index b4d6871307b7330ed8eb3f49bf2a19beb78479f8..4ddb7f11802e29f2a1bee11007cddbf82bd48b2c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __KMP_omp_dynamic_link_H
index bf9c3d33b383287295b7ba4dec6f989701739e2e..79267b0258b853b0a14835f440b1fc6d141081ee 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // No ifndef guard because this file is not a normal include file.
index d80ffbd36dcd6a0a9b45f2b0f481b894a7dd66f8..b42a518d76682e2dd8fdb77579db3963eaaef31f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "rml_omp.h"
index 83641cbb5654233f6a13ae86c7061dad95b46a21..064dd67f214f31c0986a246d2932163cf034b421 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "../include/rml_tbb.h"
index a89a0d87df3ff10ea49d71bdd1e4625c11782ddf..1dfb7012a803eca854caa4778f7e48e84fc9a536 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Header guard and namespace names follow rml conventions.
index 7a282109d7207a6542f8ca12d5652602683e8d2e..5a346c3960b32f8f53b40f90aef737ade7fa7629 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Header guard and namespace names follow OpenMP runtime conventions.
index a1207b8747d597fdb3972d7ba8cab5fe43a6e870..4cdb925059fb0618d72d5edea3594c3590963775 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Header guard and namespace names follow TBB conventions.
index d2954d027b4b205e5106cb9d1acc4b8b0bea08b8..d336f287aaa1934fa406802bae986b736fa120f4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstddef>
index c5f9a8259337794669bf8db9cbdf0140015462cb..512407bd6472104b5263622a3428119b1a58bb6e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstddef>
index 82fd34b9540379ed1a866e7d914cec1886d647c1..35a056e9f9d0c292ac0e245ff92c740ea4ebb810 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstddef>
index 5da76d7937f580de58fcb10f8100ab4964dcf790..f18393d9bd50adfc281603a656ba3a8520bbc2e5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <cstddef>
index db0a49c4feeb0308567c02eb31ef5957a8fc7f79..fa059be54760d370984963fdb06dc2fac1227aaf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Thread level recorder
index 27d32b198db6f022e933be59cbe2da24ce60c736..e218957f5db9560139f18ad482f865373f154717 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
 // Microsoft Visual C++ generated resource script.
 //
index b9d1f5175da3a2eb2eb1ddd298e49d6d2d75803d..26e798a09ab5912486506fb3d644bc86542fce08 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __RML_job_automaton_H
index 923cf65adac4d1cd65b528e6cb7a03386796cd44..01c8753eb0cc0cd37dbe4af5550700e92e241b4b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 2d30c11cd43ffefe05b5486b483ee83d24e8dfad..7cc9f1f27bc99219d29b7beb3cb08cc942bb6649 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "rml_tbb.h"
index 242393da4947d68fe3cf1c10ff842c8dab3fc2e3..2a9df54e5570f7aa85cacc0c2508637b6d255f95 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // All platform-specific threading support is encapsulated here. */
index 163bb9643514a219fcf743932d273859319dba3a..b199ffdca18a634037c1ea91d1afeb9c50bad0cd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __RML_wait_counter_H
index 0c6fd390f33b2d5cbb7b0b2fd7b4a354213cc38f..a52aa2aec79eb4f6452289c4e736e6f617b74352 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 EXPORTS
 
index 0c6fd390f33b2d5cbb7b0b2fd7b4a354213cc38f..a52aa2aec79eb4f6452289c4e736e6f617b74352 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 EXPORTS
 
index 4310de47373c64ea29b960fd459be6f1d9cad07d..d4179067bd60c97ff391a22ad27aee04174d4cde 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // This file is compiled with C++, but linked with a program written in C.
index e80cbb4975a524b587c0a09b7ef4cb1ab3ccd539..4d849aa29f22334b672448601c6ab2e3af7c981d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index f5e2dd05d3f19f2ead82776e0d71ad97ef01a3f5..43f8c8d27a23a5434bcaadafb0ba2b0057f58081 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <tbb/tbb_config.h>
index d8f22a45b1c5c0fae992ea925e50e2cd7a2d3e58..668f6b0734a35475d7828affffbbe6b7a189ce00 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <tbb/tbb_config.h>
index c9e724814e449f8ecf38a0cc58ab5d5e6a84c4a1..dc3eca2cbd121e9270cd9c11503c67adc7796910 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 void Cplusplus();
index 6e63c3392de465c673e8502dc0a80915bc685791..61af4ca2124a629c9322fd3592ebc5684b056ec7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <tbb/tbb_config.h>
index 3d9e5a2d3498979b5ea584ad07e7b85d7ad0281c..b1e9cc129d95a2e6dc2efec69a9991653019e6a8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* This header contains code shared by test_omp_server.cpp and test_tbb_server.cpp 
index 2151d73a7a37ed08c82651f601d7b9878e6fba6b..f32f51dfc2437f064de67712b934e187e1b4b11a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 40e49459e203af10f6006e58dd7544c4f1ff9d6e..9b4d627e4d22936c7c4f88f7d3a8508d41c4ea15 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/global_control.h" // thread_stack_size
@@ -803,8 +799,8 @@ void task_arena_base::internal_enqueue( task& t, intptr_t prio ) const {
     generic_scheduler* s = governor::local_scheduler_if_initialized();
     __TBB_ASSERT(s, "Scheduler is not initialized"); // we allocated a task so can expect the scheduler
 #if __TBB_TASK_GROUP_CONTEXT
-    __TBB_ASSERT(my_arena->my_default_ctx == t.prefix().context, NULL);
-    __TBB_ASSERT(!my_arena->my_default_ctx->is_group_execution_cancelled(), // TODO: any better idea?
+    // Is there a better place for checking the state of my_default_ctx?
+    __TBB_ASSERT(!(my_arena->my_default_ctx == t.prefix().context && my_arena->my_default_ctx->is_group_execution_cancelled()),
                  "The task will not be executed because default task_group_context of task_arena is cancelled. Has previously enqueued task thrown an exception?");
 #endif
     my_arena->enqueue_task( t, prio, s->my_random );
index d99afdb4a30b038e924dad5ec326ab025d8e8a9f..a5e9c0615e0d21f44b06ed927e750f41bb434b69 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_arena_H
index b65197587a55a1009250f0832616aba701009b8f..e6cd4848604ec15a9e051ea7b0366f4ec8a662b8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 85dc06a84e0860521a97ad39c0258e052aac368f..295734b61fe075161973230c74e4b8c0aea96e3e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* The API to enable interoperability between Intel(R) Cilk(TM) Plus and
index 7104424d7fb6b0fc8b2263c36665d5e83ace5026..5ad5884ff350e3eec731c7edef2c0a0bb35fa050 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/concurrent_hash_map.h"
index 2cb9b3ed60a37dd4291c578232c56eb6e1eab72c..d9c85669cb3418054bfdde6735a4eb572667446d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "concurrent_monitor.h"
index 26aa2dcf50eea0d480c1e681399a9b968bc81cbe..712cd5b15f382dfae8cfe1245b15f387a770d9ec 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_concurrent_monitor_H
index de61ff39255fab96ffa40436f6dc04574444165f..1c1d87819e7ae868a0c222f32be431ed43c16de4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_stddef.h"
index 70653a99fcf7c7e7da939f14bf90cf5073436342..3dec58df6cae5fa648072b4fb936a7d46c33a42f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if (_MSC_VER)
index b7b8cafa07ce4c8276d46d84a225ce9d774d2c28..58b3745f92f0e4ececf89d860c0a9242e3f1d155 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 8436c2105b5d58421085e70e01d925b7461b5932..f2cce9985306155c287717b568fa1b6d0685ca59 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/critical_section.h"
index 791c1057300f5c5ca94647fd647ffe295bacb60c..d703b9e48f6745253a7a52cef924dd455ac9bcb2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_custom_scheduler_H
index b09136cc5933f4342f80a46b39218d3cc5d4c267..23221d4764cd8a72e5818ceec5f9d3222465380e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "dynamic_link.h"
index 958cc483fd0ef5a49b2638a378745aa63285ab4f..759f5807bd0223e423c529b3f927367100f6f727 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_dynamic_link
index d6c31e3d3f87d44d02f0a98708ef34306de35c3e..99516a9647ec2bde5d202bc89d4f14f8fc6237f0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <stdio.h>
index ad871a23e45d33b0aba55a15ba42897183580c35..3a773bb42ad179f6a6dbd819ce489e2a14faee8d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_governor_H
index 75395fcee897bad24ed0abc137a21267f2467e1f..8974de17634c20af1a8cec588f6e5580f0640b37 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 .686
 .model flat,c
index b6a0f72b01fcc60a13aeeee09b410d1f3f9b34b8..b30015c6b1c306e5051f484a4ca096c6ec08a5c1 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 .686
 .model flat,c
index bd1643e87f4b4a1f3e50101928c213becf531fad..85de6ea5eaf4b695d5e789cd97d1ab9d14a1c731 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 ; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE
 .686
index 2dc84afc90e33f28921bad43753cda000ac0c1c0..320bedd26a232eaffc2aa37322eb49357923051b 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
 // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh
 # 1 "<stdin>"
index b189ae93c48cbb7c55056de7fa6fd25b88542e98..0ee937f14ef3df9d844b5a91f30a4cc7c9b1a225 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
        // RSE backing store pointer retrieval
     .section .text
index cc63a87a58b9f01fe73df0cb3fe740fa43fda11b..947147a29c4b87e9d6859ed07a6f303f4f4b5a53 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
        // Support for class TinyLock
        .section .text
index 53d16f89691e467fdf05d5fca5800c5f0b882b8c..cec9e09328292a895abf849393ee276ea4f2f206 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
        .section .text
        .align 16
index 9f78d0d6f53a5eaf456d02c694dbe4c53755079b..683c4963b57fbb0237ce34610662e15c9d684565 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
        .section .text
        .align 16
index 1985cde2c7a7d86a70a7feffadbb1106e2a01f92..a43d768db16cf19274189c048caa18457c9b4e4c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <stdint.h>
index 4925b6e3d9abddf4eed47258535dbf72601cb6ab..0242775b94c25bea3114310fb1a61c661a0cdeb8 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 ; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE
 .code 
index 934be9902f473749f5644e88b14c66f3de00d0af..ea26d582fedadcee61580a2b5fd402b6ce8f556a 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 .code
        ALIGN 8
index fb69b738b623ee59d2d03f1e4d1252e5977dfd17..6e3ff711fa07371f3f4a97b1c2015da12996c32c 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 .code
         ALIGN 8
index d7726e68a7c0aff9b9350574d1e7685ae2eb99c8..07ed1f31bfc81e5497353dccb8a2004cabcd634e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_intrusive_list_H
index 4286491c9905da89c0f98ab5a173ad86d05949ad..8e70ca43d037de09589f02ff8113f53b6d2c2265 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if DO_ITT_NOTIFY
index 3e322b5675badf4d358fb9e82f10c8a3fb103824..89dd5c5aafb2642cc0024e42d13c5d2c44befe8e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_ITT_NOTIFY
index 9c6e83e418276cbf72eb297df9d4d0bc70d10e7b..f3a9d56c31cfe52da50a62aa045b669c7b84931f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 839f39971f66c8a7990cfb454234fa57ef2a4ae4..12a21b418b609389599200c90eb422e420f7e782 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index fa7b148b2df6a5d0433a23405eb78278e23e1f9b..192a78c7807f30e2f1235839848cb1214e345715 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index edc4afddc603a357833d5f15601359ba4e74d44a..6f569839d959f41e75f817a6fc7b920a73357533 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 5235cca3abf2b4c28c1b10167460f9eb7f59e8fb..23adff286e911bbb62f6d7244171d81912e09345 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 0ac7e5af5daaecb3cf96ec1affd32347bc16756f..908f514f71514ecc79f1b842f3d880d95e2d7a2e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index c16fa4657776ac795ed39eefe8a3fbb79efc0fba..3fcfa82b7b4f6a28b638024dbf79898ac2542320 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define __TBB_SYMBOL( sym ) _##sym
index ea853a9911f3f5a0e98bb8a6ab5983b059beb9cf..ccc7ac95b84b8b80c2824dfe7551d062d7299594 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 376584696fea2a3df5433d717caca90393d49e67..a83d48ba929c578c5d4b67cdfb8ee899781cca26 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define __TBB_SYMBOL( sym ) _##sym
index 9eeae6f5668c83989b664927f67b8e0eaa4866c3..22c5f3bff49aa7a99f45c34c5dbda17dc669f047 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 3b3b060d392b58ccc22f28798005f879e5b10953..bd02355e4ba3d513445b5fd9e9b75a267ea204ca 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_mailbox_H
index 1b6cafe71b9c725fe34464e58dafea468e788b2a..8ff5c549bda90b44e0e03a7bc3ca011340020633 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_stddef.h"
index bc3874f7ec9358449b4f9337d65d4a9cce44b3b7..ee4e90386443a163da22e17730baa2743d66010d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_market_H
index b17f0c436bb8ec9664fb7bf470e1fc663ededc35..677aa675cfb4036cae97b5aee34c470d5724d75d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _WIN32||_WIN64
index 1b4eb28ac8f1e8e787cfd70cf7ebbc001c946119..a214155e728f58fa4dd73fc4c23d599c305bc614 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 5f7822e2f0f9c92b08cb481eb42769b768cc239f..2a0fb5bfcd3411c9a7ddbb04f4609025aff35218 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_observer_proxy_H
index c41c2ae57e76dde08b942edfbc70f731f9f51886..b3cd441cc42fefc60ffbf40d7214ec462e3738ff 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/pipeline.h"
index c08e0256c73e182e2b61960a8bb0bdb873e5232e..4f3b3b7864ed6cd44a6963484785c3635d5b9d71 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "../rml/include/rml_tbb.h"
index 4083c10f82183d229000f9267da6a448e9fb1711..1aa11def72d68671c4c16a78b788833e7cb47f5d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/queuing_mutex.h"
index b4db227e07cf78efc261d8438d0c6d028d3f787e..ce751571ed8b57dbb7bf9a432800e8b2dad7380c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /** Before making any changes in the implementation, please emulate algorithmic changes
index 120c8418dd77a6f712c3bd04669fa60f3df6e9b7..6fae23469693b16095f26e217d008fc288db63dc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/reader_writer_lock.h"
index 55438b0ba84504b088811170a8c44ad214ed4f2a..18565bc9ebe23a4f1dff7408357a327d32036791 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/recursive_mutex.h"
index 0f10afcccef41aa47a85da790894e4e34ac77dd8..2aa402d50df362d64a6a0e1254ec557e81eac065 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "custom_scheduler.h"
index c96ba6d34ad200bbc02e5bd77577fe409259bda1..ace18dba53ffd84e53344d0b7b9303cc52ffbc57 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_scheduler_H
@@ -119,7 +115,7 @@ struct scheduler_state {
     the thread that creates the instance.
 
     Class generic_scheduler is an abstract base class that contains most of the scheduler,
-    except for tweaks specific to processors and tools (e.g. VTune).
+    except for tweaks specific to processors and tools (e.g. VTune(TM) Performance Tools).
     The derived template class custom_scheduler<SchedulerTraits> fills in the tweaks. */
 class generic_scheduler: public scheduler
                        , public ::rml::job
index 852ea39413cebb16c02961b6682db831ff3967a7..19c494e60a4aee87aff3eceac5d1c28bbf39cd5f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_scheduler_common_H
index 2d6899fa4c0d16055e7bc81bb19d292b54f55b4f..6b6681aecc1927b12167de77bfd341b48c0da355 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_scheduler_utility_H
index 3fad8aa318528a0dd4df51a38b4f11dacc33b491..b0e2afa003b5e766ddcbafa1a0399ddb2fe72324 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "semaphore.h"
index ce263d42e9fe9db2aa807f6efa7a6096e1c9b2d4..472255f09a95933879f6d13002717a749b5bd2a6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_semaphore_H
index 4278dedd421e5a8e465e8736da30a3bc13e0b0b2..4a5dfde5c275c0d51f66c510f658655e12ea84b4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_machine.h"
index d87f57c595f5cf09f47ac29219719a14c645f3b8..89a8bc7b1819fd16fce27aff31d7a5c6c3662f9a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/spin_rw_mutex.h"
index 7dc497eb900296e5c675c45f484fdb702d72bc49..a7a8352643bc09d902814cf5b2c11c2aa446d569 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Do not include task.h directly. Use scheduler_common.h instead
index 23f564d6374627afb9ab804a570224243e5b76fe..d6097251a9fd52b35d5ac965ea88fba90b0f32e9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "scheduler.h"
index f951163ad0448c4bff3977584366dd6188d9b029..62d357a15b7377f029c23a6b0ecbc151856239d0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_task_stream_H
index ee039daae05e284e9b2114fcce8943576949048e..891379d3aae623daa42e187c34a52ea0671ec969 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_task_stream_extended_H
index 141b47e9ccfd4a42a85f5c096aae77c0ddeab97c..ac23e30d523303b4f40fe42465bbf1a56ac6057b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_assert_impl_H
index de9cbb2c7a7a5474a154f6e64db0b56fb49f60e5..cc00ca2dbbe21ee00325933356476a5a3e8ce047 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (c) 2005-2019 Intel Corporation
+    Copyright (c) 2018-2019 Intel Corporation
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbb_environment_H
@@ -23,6 +19,8 @@
 
 #include <cstdlib>
 #include <cstring>
+#include <cerrno>
+#include <cctype>
 
 namespace tbb {
 
@@ -32,6 +30,10 @@ namespace internal {
 static inline bool GetBoolEnvironmentVariable( const char * ) {
     return false;
 }
+
+static inline long GetIntegralEnvironmentVariable( const char * ) {
+    return -1;
+}
 #else  /* __TBB_WIN8UI_SUPPORT */
 static inline bool GetBoolEnvironmentVariable( const char * name ) {
     if( const char* s = std::getenv(name) )
@@ -51,6 +53,30 @@ static inline bool GetBoolEnvironmentVariable( const char * name ) {
     }
     return false;
 }
+
+static inline long GetIntegralEnvironmentVariable( const char * name ) {
+    if( const char* s = std::getenv(name) )
+    {
+        char* end = NULL;
+        errno = 0;
+        long value = std::strtol(s, &end, 10);
+
+        // We have exceeded the range, value is negative or string is incovertable
+        if ( errno == ERANGE || value < 0 || end==s )
+        {
+            return -1;
+        }
+
+        for ( ; *end != '\0'; end++ )
+        {
+            if ( !std::isspace(*end) )
+                return -1;
+        }
+
+        return value;
+    }
+    return -1;
+}
 #endif /* __TBB_WIN8UI_SUPPORT */
 
 } // namespace internal
index 706c219217552fd8c4d10079e23a3e2cc61e23c0..18ccc51d665986708588b04295c4df1ca5336d16 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 0ba4ac08fb062cc3cb6aa1e3ad788fb74d3d067e..babca1a819fa188f4e38484499a5bcfab5f49b7d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_tbb_main_H
index f02fb51585b9d4260affb762d58fd0a04dad332a..1e71cdc90cfc3fabb55f6d879551185956d59404 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Source file for miscellaneous entities that are infrequently referenced by
index c9e0474694ed01f44f25297e03ba0c1e6097169c..6042bb5e4d1daf1cce9f54f96b3b2cb08324206c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_tbb_misc_H
index b50aa2196d8a4d23609e96a9b5f61f1d3de8e4ad..bfa5830d3dea3198c2bcb8184e3eff3a89060826 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Source file for miscellaneous entities that are infrequently referenced by
index c2f3968fdc226a38b5cb6ae19d3205e770a93937..19822d9085abedc2aa478da62c8f8efa73aac366 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
 // Microsoft Visual C++ generated resource script.
 //
index 9bbc22ae7ae864fb9877b9547530a574963b2914..2ca03b37b7848c57835e82039ea25309a00f2af6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb_statistics.h"
index 4ee9fb6cf634f4328b7a29b3294117c356920f05..fb5d9ccd6af5345713a5d637037d79cd3b6396bc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_tbb_statistics_H
index d5da163dd7cc8098bc3d350425c888db4bb7495f..7de94922a6ef02a0cf0c36c74b2fb82f7675aed1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _WIN32||_WIN64
index 000250bb68536c9443c169d9a54fc103da0dc8f4..f8606f266c688080b3c2c23a21e61d81688162d7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Please define version number in the file:
index 685f6fe1c7afb9990ab652dc39d8f25b2e628f93..ba6f2dde4410d926dd3e04846930ef25c5e1bc12 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_tls_H
index c4e9bf8c991b4a0d4a87055e1c1250d6c2a425fc..72eda850a3637e180414c3c744f9afd676a12f45 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "ittnotify_config.h"
index 89b0058e4aae2228fe084900e88b4d2e96277b5f..d4810860e3dd95954ed874f20a41a4c78a464373 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _ITTNOTIFY_H_
index eda49f262251b7965b7d39871eaf4a331ebfd1a7..84af62df958a26ea4352e5651eaeef54dad59a8c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _ITTNOTIFY_CONFIG_H_
index 1bd1d2eb2825ea45544f0212382f11a9a32d14ba..6e082cba7158a40503dacb7c79ecc6506642bec7 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "ittnotify_config.h"
index 2ce265d43cc7204edfa890880f6bb5aa9601bdc7..58c1a4bb5183b0961a3a87da41a9b92b01b2a465 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "ittnotify_config.h"
index 5ee3c92ad22def92335b82b3c5aee9c8e4c1513f..acca4e87de67a93671173c0a598c8f9f10a9ecfc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _ITTNOTIFY_TYPES_H_
index 3ec0e1b8d28d834090181dc7dfdffd89d0f47a68..17056e05f08b4ff408de5d3422b2f814159c3727 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _LEGACY_ITTNOTIFY_H_
index cc6f3d40c11c6b97f11a7dc69561b00f9a22f92f..82c2ea2e8281d964c72936525460739bc76c328f 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 EXPORTS
 
index 70d11321014ab5cab744700997ae529356c98da2..a6c4b786a494c840127b8d9bf8379d01dbbb365d 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 #include "tbb/tbb_config.h"
 
index ba327400d5578392801a7206efc232a1713a7ce0..944aae7cdb3dd5c4c6cb43d867375be203670500 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 891d54133e17fb6c86d37a7b04702db358b684f7..452c137f38a49ad8a4661cf9fc4ff7f4170db29c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 7226b213926d4c4ddada550df82a0d42e6e2e685..e4c22e7b48771f650f6b545599d5c3b4fb414218 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 ; This file is organized with a section for each .cpp file.
 ; Each of these sections is in alphabetical order.
index 1c7ee5f90e54a8bf8b83ada3051264b77bd95968..b044bbe9f495f66fd8c3ae1d7d91809d853fd231 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 // This file is organized with a section for each .cpp file.
 // Each of these sections is in alphabetical order.
index 2facc9c68970122bc05ff42b2905e5f317e122df..1fccb4f8268121c83852b43cdfabf986dd84a604 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 #include "tbb/tbb_config.h"
 
index be4a3685ca1f3276c6c37ad0d7ce9c69614691ee..e521830794119183aefe25a99d9c4a8b225bb565 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index c0aa06bef525b7dbec7e3fcc51054ee2f46d754a..f5497bc5c17ea87c854b3afee4847dbe7e35617d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_malloc_Customize_H_
index 04222ff32e652de791cfe0d84fa6db7025098cd7..bfe5bdc50403be327a173871ce9972b98bd3aaeb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _itt_shared_malloc_MapMemory_H
index 1a9077fe76f9459fbd69e91c51d540cc2e3aaefe..ad19731764aeb8bf4301679ee8e5c83ccadbc10e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define MAX_THREADS 1024
index def91fa936288ce14bd0ac78825bac2b200f512f..f38f69d2e8fe5fd0707acc9256c7391fa97490a4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_malloc_Synchronize_H_
index 199ad6193c269e7ee036c65032ff89589eed9e1e..3178442e9c9f88fc0f8fdf657c04409274141daf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _itt_shared_malloc_TypeDefinitions_H_
index 6cda7ec53579a06cbbfdd1e5f355c93e3b6b5db2..d9a37e35d6aa3427ed66aade34f8d439d7b0474e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <string.h>   /* for memset */
@@ -225,7 +221,7 @@ public:
     // valid only when block is in processing, i.e. one is not free and not
     size_t        sizeTmp;    // used outside of backend
     int           myBin;      // bin that is owner of the block
-    bool          aligned;
+    bool          slabAligned;
     bool          blockInBin; // this block in myBin already
 
     FreeBlock *rightNeig(size_t sz) const {
@@ -381,9 +377,8 @@ inline void CoalRequestQ::blockWasProcessed()
 //     split the block without removing it.
 // If the free space should go to other bin(s), remove the block.
 // alignedBin is true, if all blocks in the bin have slab-aligned right side.
-FreeBlock *Backend::IndexedBins::getFromBin(int binIdx, BackendSync *sync,
-                size_t size, bool needAlignedRes, bool alignedBin, bool wait,
-                int *binLocked)
+FreeBlock *Backend::IndexedBins::getFromBin(int binIdx, BackendSync *sync, size_t size,
+        bool needAlignedRes, bool alignedBin,  bool wait, int *binLocked)
 {
     Bin *b = &freeBins[binIdx];
 try_next:
@@ -405,50 +400,36 @@ try_next:
                 goto try_next;
             }
 
+            // GENERAL CASE
             if (alignedBin || !needAlignedRes) {
                 size_t splitSz = szBlock - size;
-                // If we got a block as split result,
-                // it must have a room for control structures.
-                if (szBlock >= size && (splitSz >= FreeBlock::minBlockSize ||
-                                        !splitSz))
+                // If we got a block as split result, it must have a room for control structures.
+                if (szBlock >= size && (splitSz >= FreeBlock::minBlockSize || !splitSz))
                     fBlock = curr;
             } else {
+                // SPECIAL CASE, to get aligned block from unaligned bin we have to cut the middle of a block
+                // and return remaining left and right part. Possible only in fixed pool scenario, assert for this
+                // is set inside splitBlock() function.
+
                 void *newB = alignUp(curr, slabSize);
                 uintptr_t rightNew = (uintptr_t)newB + size;
                 uintptr_t rightCurr = (uintptr_t)curr + szBlock;
-                // appropriate size, and left and right split results
-                // are either big enough or non-existent
+                // Check if the block size is sufficient,
+                // and also left and right split results are either big enough or non-existent
                 if (rightNew <= rightCurr
-                    && (newB==curr ||
-                        (uintptr_t)newB-(uintptr_t)curr >= FreeBlock::minBlockSize)
-                    && (rightNew==rightCurr ||
-                        rightCurr - rightNew >= FreeBlock::minBlockSize))
+                        && (newB == curr || ((uintptr_t)newB - (uintptr_t)curr) >= FreeBlock::minBlockSize)
+                        && (rightNew == rightCurr || (rightCurr - rightNew) >= FreeBlock::minBlockSize))
                     fBlock = curr;
             }
+
             if (fBlock) {
-                // consume must be called before result of removing from a bin
-                // is visible externally.
+                // consume must be called before result of removing from a bin is visible externally.
                 sync->blockConsumed();
-                if (alignedBin && needAlignedRes &&
-                    Backend::sizeToBin(szBlock-size) == Backend::sizeToBin(szBlock)) {
-                    // free remainder of fBlock stay in same bin,
-                    // so no need to remove it from the bin
-                    // TODO: add more "still here" cases
-                    FreeBlock *newFBlock = fBlock;
-                    // return block from right side of fBlock
-                    fBlock = (FreeBlock*)((uintptr_t)newFBlock + szBlock - size);
-                    MALLOC_ASSERT(isAligned(fBlock, slabSize), "Invalid free block");
-                    fBlock->initHeader();
-                    fBlock->setLeftFree(szBlock - size);
-                    newFBlock->setMeFree(szBlock - size);
-
-                    fBlock->sizeTmp = size;
-                } else {
-                    b->removeBlock(fBlock);
-                    if (freeBins[binIdx].empty())
-                        bitMask.set(binIdx, false);
-                    fBlock->sizeTmp = szBlock;
-                }
+                // TODO: think about cases when block stays in the same bin
+                b->removeBlock(fBlock);
+                if (freeBins[binIdx].empty())
+                    bitMask.set(binIdx, false);
+                fBlock->sizeTmp = szBlock;
                 break;
             } else { // block size is not valid, search for next block in the bin
                 curr->setMeFree(szBlock);
@@ -504,9 +485,7 @@ void Backend::Bin::removeBlock(FreeBlock *fBlock)
 void Backend::IndexedBins::addBlock(int binIdx, FreeBlock *fBlock, size_t blockSz, bool addToTail)
 {
     Bin *b = &freeBins[binIdx];
-
     fBlock->myBin = binIdx;
-    fBlock->aligned = toAlignedBin(fBlock, blockSz);
     fBlock->next = fBlock->prev = NULL;
     {
         MallocMutex::scoped_lock scopedLock(b->tLock);
@@ -533,9 +512,7 @@ bool Backend::IndexedBins::tryAddBlock(int binIdx, FreeBlock *fBlock, bool addTo
 {
     bool locked;
     Bin *b = &freeBins[binIdx];
-
     fBlock->myBin = binIdx;
-    fBlock->aligned = toAlignedBin(fBlock, fBlock->sizeTmp);
     if (addToTail) {
         fBlock->next = NULL;
         {
@@ -587,65 +564,54 @@ bool ExtMemoryPool::regionsAreReleaseable() const
     return !keepAllMemory && !delayRegsReleasing;
 }
 
-FreeBlock *Backend::splitUnalignedBlock(FreeBlock *fBlock, int num, size_t size,
-                                        bool needAlignedBlock)
+FreeBlock *Backend::splitBlock(FreeBlock *fBlock, int num, size_t size, bool blockIsAligned, bool needAlignedBlock)
 {
-    const size_t totalSize = num*size;
-    if (needAlignedBlock) {
-        size_t fBlockSz = fBlock->sizeTmp;
-        uintptr_t fBlockEnd = (uintptr_t)fBlock + fBlockSz;
-        FreeBlock *newB = alignUp(fBlock, slabSize);
-        FreeBlock *rightPart = (FreeBlock*)((uintptr_t)newB + totalSize);
-
-        // Space to use is in the middle,
-        // ... return free right part
+    const size_t totalSize = num * size;
+
+    // SPECIAL CASE, for unaligned block we have to cut the middle of a block
+    // and return remaining left and right part. Possible only in a fixed pool scenario.
+    if (needAlignedBlock && !blockIsAligned) {
+        MALLOC_ASSERT(extMemPool->fixedPool,
+                "Aligned block request from unaligned bin possible only in fixed pool scenario.");
+
+        // Space to use is in the middle
+        FreeBlock *newBlock = alignUp(fBlock, slabSize);
+        FreeBlock *rightPart = (FreeBlock*)((uintptr_t)newBlock + totalSize);
+        uintptr_t fBlockEnd = (uintptr_t)fBlock + fBlock->sizeTmp;
+
+        // Return free right part
         if ((uintptr_t)rightPart != fBlockEnd) {
             rightPart->initHeader();  // to prevent coalescing rightPart with fBlock
-            coalescAndPut(rightPart, fBlockEnd - (uintptr_t)rightPart);
+            size_t rightSize = fBlockEnd - (uintptr_t)rightPart;
+            coalescAndPut(rightPart, rightSize, toAlignedBin(rightPart, rightSize));
         }
-        // ... and free left part
-        if (newB != fBlock) {
-            newB->initHeader(); // to prevent coalescing fBlock with newB
-            coalescAndPut(fBlock, (uintptr_t)newB - (uintptr_t)fBlock);
+        // And free left part
+        if (newBlock != fBlock) {
+            newBlock->initHeader(); // to prevent coalescing fBlock with newB
+            size_t leftSize = (uintptr_t)newBlock - (uintptr_t)fBlock;
+            coalescAndPut(fBlock, leftSize, toAlignedBin(fBlock, leftSize));
         }
-
-        fBlock = newB;
-        MALLOC_ASSERT(isAligned(fBlock, slabSize), ASSERT_TEXT);
-    } else {
-        if (size_t splitSz = fBlock->sizeTmp - totalSize) {
-            // split block and return free right part
-            FreeBlock *splitB = (FreeBlock*)((uintptr_t)fBlock + totalSize);
-            splitB->initHeader();
-            coalescAndPut(splitB, splitSz);
-        }
-    }
-    FreeBlock::markBlocks(fBlock, num, size);
-    return fBlock;
-}
-
-FreeBlock *Backend::splitAlignedBlock(FreeBlock *fBlock, int num, size_t size,
-                                      bool needAlignedBlock)
-{
-    if (fBlock->sizeTmp != num*size) { // i.e., need to split the block
-        FreeBlock *newAlgnd;
-        size_t newSz;
-
+        fBlock = newBlock;
+    } else if (size_t splitSize = fBlock->sizeTmp - totalSize) { // need to split the block
+        // GENERAL CASE, cut the left or right part of the block
+        FreeBlock *splitBlock = NULL;
         if (needAlignedBlock) {
-            newAlgnd = fBlock;
-            fBlock = (FreeBlock*)((uintptr_t)newAlgnd + newAlgnd->sizeTmp
-                                  - num*size);
-            MALLOC_ASSERT(isAligned(fBlock, slabSize), "Invalid free block");
+            // For slab aligned blocks cut the right side of the block
+            // and return it to a requester, original block returns to backend
+            splitBlock = fBlock;
+            fBlock = (FreeBlock*)((uintptr_t)splitBlock + splitSize);
             fBlock->initHeader();
-            newSz = newAlgnd->sizeTmp - num*size;
         } else {
-            newAlgnd = (FreeBlock*)((uintptr_t)fBlock + num*size);
-            newSz = fBlock->sizeTmp - num*size;
-            newAlgnd->initHeader();
+            // For large object blocks cut original block and put free righ part to backend
+            splitBlock = (FreeBlock*)((uintptr_t)fBlock + totalSize);
+            splitBlock->initHeader();
         }
-        coalescAndPut(newAlgnd, newSz);
+        // Mark free block as it`s parent only when the requested type (needAlignedBlock)
+        // and returned from Bins/OS block (isAligned) are equal (XOR operation used)
+        bool markAligned = (blockIsAligned ^ needAlignedBlock) ? toAlignedBin(splitBlock, splitSize) : blockIsAligned;
+        coalescAndPut(splitBlock, splitSize, markAligned);
     }
-    MALLOC_ASSERT(!needAlignedBlock || isAligned(fBlock, slabSize),
-                  "Expect to get aligned block, if one was requested.");
+    MALLOC_ASSERT(!needAlignedBlock || isAligned(fBlock, slabSize), "Expect to get aligned block, if one was requested.");
     FreeBlock::markBlocks(fBlock, num, size);
     return fBlock;
 }
@@ -656,8 +622,7 @@ size_t Backend::getMaxBinnedSize() const
         maxBinned_HugePage : maxBinned_SmallPage;
 }
 
-inline bool Backend::MaxRequestComparator::operator()(size_t oldMaxReq,
-                                                      size_t requestSize) const
+inline bool Backend::MaxRequestComparator::operator()(size_t oldMaxReq, size_t requestSize) const
 {
     return requestSize > oldMaxReq && requestSize < backend->getMaxBinnedSize();
 }
@@ -681,7 +646,7 @@ FreeBlock *Backend::releaseMemInCaches(intptr_t startModifiedCnt,
 
 FreeBlock *Backend::askMemFromOS(size_t blockSize, intptr_t startModifiedCnt,
                                  int *lockedBinsThreshold, int numOfLockedBins,
-                                 bool *splittableRet)
+                                 bool *splittableRet, bool needSlabRegion)
 {
     FreeBlock *block;
     // The block sizes can be divided into 3 groups:
@@ -730,13 +695,14 @@ FreeBlock *Backend::askMemFromOS(size_t blockSize, intptr_t startModifiedCnt,
             // This must be done carefully, because blocks in bins can be released
             // in releaseCachesToLimit().
             const unsigned NUM_OF_REG = 3;
-            block = addNewRegion(regSz_sizeBased, MEMREG_FLEXIBLE_SIZE, /*addToBin=*/false);
+            MemRegionType regType = needSlabRegion ? MEMREG_SLAB_BLOCKS : MEMREG_LARGE_BLOCKS;
+            block = addNewRegion(regSz_sizeBased, regType, /*addToBin=*/false);
             if (block)
                 for (unsigned idx=0; idx<NUM_OF_REG; idx++)
-                    if (! addNewRegion(regSz_sizeBased, MEMREG_FLEXIBLE_SIZE, /*addToBin=*/true))
+                    if (! addNewRegion(regSz_sizeBased, regType, /*addToBin=*/true))
                         break;
         } else {
-            block = addNewRegion(regSz_sizeBased, MEMREG_SEVERAL_BLOCKS, /*addToBin=*/false);
+            block = addNewRegion(regSz_sizeBased, MEMREG_LARGE_BLOCKS, /*addToBin=*/false);
         }
         memExtendingSema.signal();
 
@@ -767,9 +733,9 @@ void Backend::releaseCachesToLimit()
     // do this in several tries, because backend fragmentation can prevent
     // region from releasing
     for (int cleanLocal = 0; cleanLocal<2; cleanLocal++)
-        while (cleanLocal?
-               extMemPool->allLocalCaches.cleanup(extMemPool, /*cleanOnlyUnused=*/true)
-               : extMemPool->loc.decreasingCleanup())
+        while (cleanLocal ?
+                 extMemPool->allLocalCaches.cleanup(/*cleanOnlyUnused=*/true) :
+                 extMemPool->loc.decreasingCleanup())
             if ((locTotalMemSize = FencedLoad((intptr_t&)totalMemSize)) <=
                 (locMemSoftLimit = FencedLoad((intptr_t&)memSoftLimit)))
                 return;
@@ -777,13 +743,17 @@ void Backend::releaseCachesToLimit()
     extMemPool->hardCachesCleanup();
 }
 
-FreeBlock *Backend::IndexedBins::
-    findBlock(int nativeBin, BackendSync *sync, size_t size,
-              bool resSlabAligned, bool alignedBin, int *numOfLockedBins)
+int Backend::IndexedBins::getMinNonemptyBin(unsigned startBin) const
+{
+    int p = bitMask.getMinTrue(startBin);
+    return p == -1 ? Backend::freeBinsNum : p;
+}
+
+FreeBlock *Backend::IndexedBins::findBlock(int nativeBin, BackendSync *sync, size_t size,
+        bool needAlignedBlock, bool alignedBin, int *numOfLockedBins)
 {
     for (int i=getMinNonemptyBin(nativeBin); i<freeBinsNum; i=getMinNonemptyBin(i+1))
-        if (FreeBlock *block = getFromBin(i, sync, size, resSlabAligned, alignedBin,
-                                          /*wait=*/false, numOfLockedBins))
+        if (FreeBlock *block = getFromBin(i, sync, size, needAlignedBlock, alignedBin, /*wait=*/false, numOfLockedBins))
             return block;
 
     return NULL;
@@ -800,7 +770,7 @@ void Backend::requestBootstrapMem()
     bootsrapMemStatus = bootsrapMemInitializing;
     // request some rather big region during bootstrap in advance
     // ok to get NULL here, as later we re-do a request with more modest size
-    addNewRegion(2*1024*1024, MEMREG_FLEXIBLE_SIZE, /*addToBin=*/true);
+    addNewRegion(2*1024*1024, MEMREG_SLAB_BLOCKS, /*addToBin=*/true);
     bootsrapMemStatus = bootsrapMemDone;
 }
 
@@ -830,37 +800,29 @@ FreeBlock *Backend::genericGetBlock(int num, size_t size, bool needAlignedBlock)
 
         do {
             numOfLockedBins = 0;
-
-            // TODO: try different bin search order
             if (needAlignedBlock) {
-                block = freeAlignedBins.findBlock(nativeBin, &bkndSync, num*size,
-                                    /*needAlignedBlock=*/true, /*alignedBin=*/true,
-                                    &numOfLockedBins);
-                if (!block)
-                    block = freeLargeBins.findBlock(nativeBin, &bkndSync, num*size,
-                                    /*needAlignedBlock=*/true, /*alignedBin=*/false,
-                                    &numOfLockedBins);
+                block = freeSlabAlignedBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,
+                                                        /*alignedBin=*/true, &numOfLockedBins);
+                if (!block && extMemPool->fixedPool)
+                    block = freeLargeBlockBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,
+                                                        /*alignedBin=*/false, &numOfLockedBins);
             } else {
-                block = freeLargeBins.findBlock(nativeBin, &bkndSync, num*size,
-                                    /*needAlignedBlock=*/false, /*alignedBin=*/false,
-                                    &numOfLockedBins);
-                if (!block)
-                    block = freeAlignedBins.findBlock(nativeBin, &bkndSync, num*size,
-                                    /*needAlignedBlock=*/false, /*alignedBin=*/true,
-                                    &numOfLockedBins);
+                block = freeLargeBlockBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,
+                                                        /*alignedBin=*/false, &numOfLockedBins);
+                if (!block && extMemPool->fixedPool)
+                    block = freeSlabAlignedBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,
+                                                        /*alignedBin=*/true, &numOfLockedBins);
             }
         } while (!block && numOfLockedBins>lockedBinsThreshold);
 
         if (block)
             break;
 
-        if (!(scanCoalescQ(/*forceCoalescQDrop=*/true)
-              | extMemPool->softCachesCleanup())) {
+        if (!(scanCoalescQ(/*forceCoalescQDrop=*/true) | extMemPool->softCachesCleanup())) {
             // bins are not updated,
             // only remaining possibility is to ask for more memory
-            block =
-                askMemFromOS(totalReqSize, startModifiedCnt, &lockedBinsThreshold,
-                             numOfLockedBins, &splittable);
+            block = askMemFromOS(totalReqSize, startModifiedCnt, &lockedBinsThreshold,
+                        numOfLockedBins, &splittable, needAlignedBlock);
             if (!block)
                 return NULL;
             if (block != (FreeBlock*)VALID_BLOCK_IN_BIN) {
@@ -873,10 +835,10 @@ FreeBlock *Backend::genericGetBlock(int num, size_t size, bool needAlignedBlock)
         }
     }
     MALLOC_ASSERT(block, ASSERT_TEXT);
-    if (splittable)
-        block = toAlignedBin(block, block->sizeTmp)?
-            splitAlignedBlock(block, num, size, needAlignedBlock) :
-            splitUnalignedBlock(block, num, size, needAlignedBlock);
+    if (splittable) {
+        // At this point we have to be sure that slabAligned attribute describes the right block state
+        block = splitBlock(block, num, size, block->slabAligned, needAlignedBlock);
+    }
     // matched blockConsumed() from startUseBlock()
     bkndSync.blockReleased();
 
@@ -895,6 +857,16 @@ LargeMemoryBlock *Backend::getLargeBlock(size_t size)
     return lmb;
 }
 
+BlockI *Backend::getSlabBlock(int num) {
+    BlockI *b = (BlockI*)genericGetBlock(num, slabSize, /*slabAligned=*/true);
+    MALLOC_ASSERT(isAligned(b, slabSize), ASSERT_TEXT);
+    return b;
+}
+
+void Backend::putSlabBlock(BlockI *block) {
+    genericPutBlock((FreeBlock *)block, slabSize, /*slabAligned=*/true);
+}
+
 void *Backend::getBackRefSpace(size_t size, bool *rawMemUsed)
 {
     // This block is released only at shutdown, so it can prevent
@@ -919,17 +891,17 @@ void Backend::putBackRefSpace(void *b, size_t size, bool rawMemUsed)
 void Backend::removeBlockFromBin(FreeBlock *fBlock)
 {
     if (fBlock->myBin != Backend::NO_BIN) {
-        if (fBlock->aligned)
-            freeAlignedBins.lockRemoveBlock(fBlock->myBin, fBlock);
+        if (fBlock->slabAligned)
+            freeSlabAlignedBins.lockRemoveBlock(fBlock->myBin, fBlock);
         else
-            freeLargeBins.lockRemoveBlock(fBlock->myBin, fBlock);
+            freeLargeBlockBins.lockRemoveBlock(fBlock->myBin, fBlock);
     }
 }
 
-void Backend::genericPutBlock(FreeBlock *fBlock, size_t blockSz)
+void Backend::genericPutBlock(FreeBlock *fBlock, size_t blockSz, bool slabAligned)
 {
     bkndSync.blockConsumed();
-    coalescAndPut(fBlock, blockSz);
+    coalescAndPut(fBlock, blockSz, slabAligned);
     bkndSync.blockReleased();
 }
 
@@ -958,7 +930,7 @@ void Backend::putLargeBlock(LargeMemoryBlock *lmb)
 {
     if (extMemPool->userPool())
         extMemPool->lmbList.remove(lmb);
-    genericPutBlock((FreeBlock *)lmb, lmb->unalignedSize);
+    genericPutBlock((FreeBlock *)lmb, lmb->unalignedSize, false);
 }
 
 void Backend::returnLargeObject(LargeMemoryBlock *lmb)
@@ -1135,8 +1107,7 @@ FreeBlock *Backend::doCoalesc(FreeBlock *fBlock, MemRegion **mRegion)
     return resBlock;
 }
 
-bool Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop,
-                                bool reportBlocksProcessed)
+bool Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop, bool reportBlocksProcessed)
 {
     bool regionReleased = false;
 
@@ -1166,12 +1137,12 @@ bool Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop,
         }
         size_t currSz = toRet->sizeTmp;
         int bin = sizeToBin(currSz);
-        bool toAligned = toAlignedBin(toRet, currSz);
+        bool toAligned = extMemPool->fixedPool ? toAlignedBin(toRet, currSz) : toRet->slabAligned;
         bool needAddToBin = true;
 
         if (toRet->blockInBin) {
             // Does it stay in same bin?
-            if (toRet->myBin == bin && toRet->aligned == toAligned)
+            if (toRet->myBin == bin && toRet->slabAligned == toAligned)
                 needAddToBin = false;
             else {
                 toRet->blockInBin = false;
@@ -1183,12 +1154,13 @@ bool Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop,
         if (needAddToBin) {
             toRet->prev = toRet->next = toRet->nextToFree = NULL;
             toRet->myBin = NO_BIN;
+            toRet->slabAligned = toAligned;
 
             // If the block is too small to fit in any bin, keep it bin-less.
             // It's not a leak because the block later can be coalesced.
             if (currSz >= minBinnedSize) {
                 toRet->sizeTmp = currSz;
-                IndexedBins *target = toAligned? &freeAlignedBins : &freeLargeBins;
+                IndexedBins *target = toRet->slabAligned ? &freeSlabAlignedBins : &freeLargeBlockBins;
                 if (forceCoalescQDrop) {
                     target->addBlock(bin, toRet, toRet->sizeTmp, addToTail);
                 } else if (!target->tryAddBlock(bin, toRet, addToTail)) {
@@ -1211,10 +1183,11 @@ bool Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop,
 
 // Coalesce fBlock and add it back to a bin;
 // processing delayed coalescing requests.
-void Backend::coalescAndPut(FreeBlock *fBlock, size_t blockSz)
+void Backend::coalescAndPut(FreeBlock *fBlock, size_t blockSz, bool slabAligned)
 {
     fBlock->sizeTmp = blockSz;
     fBlock->nextToFree = NULL;
+    fBlock->slabAligned = slabAligned;
 
     coalescAndPutList(fBlock, /*forceCoalescQDrop=*/false, /*reportBlocksProcessed=*/false);
 }
@@ -1244,13 +1217,11 @@ FreeBlock *Backend::findBlockInRegion(MemRegion *region, size_t exactBlockSize)
         "Atomic applied on LastFreeBlock, and we put it at the end of region, that"
         " is uintptr_t-aligned, so no unaligned atomic operations are possible.");
      // right bound is slab-aligned, keep LastFreeBlock after it
-    if (region->type==MEMREG_FLEXIBLE_SIZE) {
-        fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion),
-                                      sizeof(uintptr_t));
+    if (region->type == MEMREG_SLAB_BLOCKS) {
+        fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion), sizeof(uintptr_t));
         fBlockEnd = alignDown(lastFreeBlock, slabSize);
     } else {
-        fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion),
-                                      largeObjectAlignment);
+        fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion), largeObjectAlignment);
         fBlockEnd = (uintptr_t)fBlock + exactBlockSize;
         MALLOC_ASSERT(fBlockEnd <= lastFreeBlock, ASSERT_TEXT);
     }
@@ -1267,7 +1238,7 @@ FreeBlock *Backend::findBlockInRegion(MemRegion *region, size_t exactBlockSize)
     return fBlock;
 }
 
-// startUseBlock adds free block to a bin, the block can be used and
+// startUseBlock may add the free block to a bin, the block can be used and
 // even released after this, so the region must be added to regionList already
 void Backend::startUseBlock(MemRegion *region, FreeBlock *fBlock, bool addToBin)
 {
@@ -1288,17 +1259,20 @@ void Backend::startUseBlock(MemRegion *region, FreeBlock *fBlock, bool addToBin)
         unsigned targetBin = sizeToBin(blockSz);
         // during adding advance regions, register bin for a largest block in region
         advRegBins.registerBin(targetBin);
-        if (region->type!=MEMREG_ONE_BLOCK && toAlignedBin(fBlock, blockSz)) {
-            freeAlignedBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false);
+        if (region->type == MEMREG_SLAB_BLOCKS) {
+            fBlock->slabAligned = true;
+            freeSlabAlignedBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false);
         } else {
-            freeLargeBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false);
+            fBlock->slabAligned = false;
+            freeLargeBlockBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false);
         }
     } else {
         // to match with blockReleased() in genericGetBlock
         bkndSync.blockConsumed();
+        // Understand our alignment for correct splitBlock operation
+        fBlock->slabAligned = region->type == MEMREG_SLAB_BLOCKS ? true : false;
         fBlock->sizeTmp = fBlock->tryLockBlock();
-        MALLOC_ASSERT(fBlock->sizeTmp >= FreeBlock::minBlockSize,
-                      "Locking must be successful");
+        MALLOC_ASSERT(fBlock->sizeTmp >= FreeBlock::minBlockSize, "Locking must be successful");
     }
 }
 
@@ -1342,9 +1316,9 @@ FreeBlock *Backend::addNewRegion(size_t size, MemRegionType memRegType, bool add
                  "Header must be not overwritten in used blocks");
     MALLOC_ASSERT(FreeBlock::minBlockSize > GuardedSize::MAX_SPEC_VAL,
           "Block length must not conflict with special values of GuardedSize");
-    // If the region is not "flexible size" we should reserve some space for
+    // If the region is not "for slabs" we should reserve some space for
     // a region header, the worst case alignment and the last block mark.
-    const size_t requestSize = memRegType == MEMREG_FLEXIBLE_SIZE ? size :
+    const size_t requestSize = memRegType == MEMREG_SLAB_BLOCKS ? size :
         size + sizeof(MemRegion) + largeObjectAlignment
              +  FreeBlock::minBlockSize + sizeof(LastFreeBlock);
 
@@ -1388,8 +1362,8 @@ void Backend::reset()
     // no active threads are allowed in backend while reset() called
     verify();
 
-    freeLargeBins.reset();
-    freeAlignedBins.reset();
+    freeLargeBlockBins.reset();
+    freeSlabAlignedBins.reset();
     advRegBins.reset();
 
     for (MemRegion *curr = regionList.head; curr; curr = curr->next) {
@@ -1405,8 +1379,8 @@ bool Backend::destroy()
     // no active threads are allowed in backend while destroy() called
     verify();
     if (!inUserPool()) {
-        freeLargeBins.reset();
-        freeAlignedBins.reset();
+        freeLargeBlockBins.reset();
+        freeSlabAlignedBins.reset();
     }
     while (regionList.head) {
         MemRegion *helper = regionList.head->next;
@@ -1425,10 +1399,10 @@ bool Backend::clean()
     // because such regions are added in advance (see askMemFromOS() and reset()),
     // and never used. Release them all.
     for (int i = advRegBins.getMinUsedBin(0); i != -1; i = advRegBins.getMinUsedBin(i+1)) {
-        if (i == freeAlignedBins.getMinNonemptyBin(i))
-            res |= freeAlignedBins.tryReleaseRegions(i, this);
-        if (i == freeLargeBins.getMinNonemptyBin(i))
-            res |= freeLargeBins.tryReleaseRegions(i, this);
+        if (i == freeSlabAlignedBins.getMinNonemptyBin(i))
+            res |= freeSlabAlignedBins.tryReleaseRegions(i, this);
+        if (i == freeLargeBlockBins.getMinNonemptyBin(i))
+            res |= freeLargeBlockBins.tryReleaseRegions(i, this);
     }
 
     return res;
@@ -1456,8 +1430,8 @@ void Backend::verify()
 #if MALLOC_DEBUG
     scanCoalescQ(/*forceCoalescQDrop=*/false);
 
-    freeLargeBins.verify();
-    freeAlignedBins.verify();
+    freeLargeBlockBins.verify();
+    freeSlabAlignedBins.verify();
 #endif // MALLOC_DEBUG
 }
 
@@ -1506,9 +1480,9 @@ void Backend::reportStat(FILE *f)
     int regNum = regionList.reportStat(f);
     fprintf(f, "\n%d regions, %lu KB in all regions\n  free bins:\nlarge bins: ",
             regNum, totalMemSize/1024);
-    freeLargeBins.reportStat(f);
+    freeLargeBlockBins.reportStat(f);
     fprintf(f, "\naligned bins: ");
-    freeAlignedBins.reportStat(f);
+    freeSlabAlignedBins.reportStat(f);
     fprintf(f, "\n");
 }
 #endif // __TBB_MALLOC_BACKEND_STAT
diff --git a/src/tbbmalloc/backend.h b/src/tbbmalloc/backend.h
new file mode 100644 (file)
index 0000000..ed50915
--- /dev/null
@@ -0,0 +1,380 @@
+/*
+    Copyright (c) 2005-2019 Intel Corporation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#ifndef __TBB_backend_H
+#define __TBB_backend_H
+
+// Included from namespace rml::internal
+
+// global state of blocks currently in processing
+class BackendSync {
+    // Class instances should reside in zero-initialized memory!
+    // The number of blocks currently removed from a bin and not returned back
+    intptr_t inFlyBlocks;         // to another
+    intptr_t binsModifications;   // incremented on every bin modification
+    Backend *backend;
+public:
+    void init(Backend *b) { backend = b; }
+    void blockConsumed() { AtomicIncrement(inFlyBlocks); }
+    void binsModified() { AtomicIncrement(binsModifications); }
+    void blockReleased() {
+#if __TBB_MALLOC_BACKEND_STAT
+        MALLOC_ITT_SYNC_RELEASING(&inFlyBlocks);
+#endif
+        AtomicIncrement(binsModifications);
+        intptr_t prev = AtomicAdd(inFlyBlocks, -1);
+        MALLOC_ASSERT(prev > 0, ASSERT_TEXT);
+        suppress_unused_warning(prev);
+    }
+    intptr_t getNumOfMods() const { return FencedLoad(binsModifications); }
+    // return true if need re-do the blocks search
+    inline bool waitTillBlockReleased(intptr_t startModifiedCnt);
+};
+
+class CoalRequestQ { // queue of free blocks that coalescing was delayed
+private:
+    FreeBlock   *blocksToFree;
+    BackendSync *bkndSync;
+    // counted blocks in blocksToFree and that are leaved blocksToFree
+    // and still in active coalescing
+    intptr_t     inFlyBlocks;
+public:
+    void init(BackendSync *bSync) { bkndSync = bSync; }
+    FreeBlock *getAll(); // return current list of blocks and make queue empty
+    void putBlock(FreeBlock *fBlock);
+    inline void blockWasProcessed();
+    intptr_t blocksInFly() const { return FencedLoad(inFlyBlocks); }
+};
+
+class MemExtendingSema {
+    intptr_t     active;
+public:
+    bool wait() {
+        bool rescanBins = false;
+        // up to 3 threads can add more memory from OS simultaneously,
+        // rest of threads have to wait
+        for (;;) {
+            intptr_t prevCnt = FencedLoad(active);
+            if (prevCnt < 3) {
+                intptr_t n = AtomicCompareExchange(active, prevCnt+1, prevCnt);
+                if (n == prevCnt)
+                    break;
+            } else {
+                SpinWaitWhileEq(active, prevCnt);
+                rescanBins = true;
+                break;
+            }
+        }
+        return rescanBins;
+    }
+    void signal() { AtomicAdd(active, -1); }
+};
+
+enum MemRegionType {
+    // The region holds only slabs
+    MEMREG_SLAB_BLOCKS = 0,
+    // The region can hold several large object blocks
+    MEMREG_LARGE_BLOCKS,
+    // The region holds only one block with a reqested size
+    MEMREG_ONE_BLOCK
+};
+
+class MemRegionList {
+    MallocMutex regionListLock;
+public:
+    MemRegion  *head;
+    void add(MemRegion *r);
+    void remove(MemRegion *r);
+    int reportStat(FILE *f);
+};
+
+class Backend {
+private:
+/* Blocks in range [minBinnedSize; getMaxBinnedSize()] are kept in bins,
+   one region can contains several blocks. Larger blocks are allocated directly
+   and one region always contains one block.
+*/
+    enum {
+        minBinnedSize = 8*1024UL,
+        /*   If huge pages are available, maxBinned_HugePage used.
+             If not, maxBinned_SmallPage is the threshold.
+             TODO: use pool's granularity for upper bound setting.*/
+        maxBinned_SmallPage = 1024*1024UL,
+        // TODO: support other page sizes
+        maxBinned_HugePage = 4*1024*1024UL
+    };
+    enum {
+        VALID_BLOCK_IN_BIN = 1 // valid block added to bin, not returned as result
+    };
+public:
+    static const int freeBinsNum =
+        (maxBinned_HugePage-minBinnedSize)/LargeObjectCache::largeBlockCacheStep + 1;
+
+    // if previous access missed per-thread slabs pool,
+    // allocate numOfSlabAllocOnMiss blocks in advance
+    static const int numOfSlabAllocOnMiss = 2;
+
+    enum {
+        NO_BIN = -1,
+        // special bin for blocks >= maxBinned_HugePage, blocks go to this bin
+        // when pool is created with keepAllMemory policy
+        // TODO: currently this bin is scanned using "1st fit", as it accumulates
+        // blocks of different sizes, "best fit" is preferred in terms of fragmentation
+        HUGE_BIN = freeBinsNum-1
+    };
+
+    // Bin keeps 2-linked list of free blocks. It must be 2-linked
+    // because during coalescing a block it's removed from a middle of the list.
+    struct Bin {
+        FreeBlock   *head,
+                    *tail;
+        MallocMutex  tLock;
+
+        void removeBlock(FreeBlock *fBlock);
+        void reset() { head = tail = 0; }
+        bool empty() const { return !head; }
+
+        size_t countFreeBlocks();
+        size_t reportFreeBlocks(FILE *f);
+        void reportStat(FILE *f);
+    };
+
+    typedef BitMaskMin<Backend::freeBinsNum> BitMaskBins;
+
+    // array of bins supplemented with bitmask for fast finding of non-empty bins
+    class IndexedBins {
+        BitMaskBins bitMask;
+        Bin         freeBins[Backend::freeBinsNum];
+        FreeBlock *getFromBin(int binIdx, BackendSync *sync, size_t size,
+                bool needAlignedBlock, bool alignedBin, bool wait, int *resLocked);
+    public:
+        FreeBlock *findBlock(int nativeBin, BackendSync *sync, size_t size,
+                bool needAlignedBlock, bool alignedBin,int *numOfLockedBins);
+        bool tryReleaseRegions(int binIdx, Backend *backend);
+        void lockRemoveBlock(int binIdx, FreeBlock *fBlock);
+        void addBlock(int binIdx, FreeBlock *fBlock, size_t blockSz, bool addToTail);
+        bool tryAddBlock(int binIdx, FreeBlock *fBlock, bool addToTail);
+        int  getMinNonemptyBin(unsigned startBin) const;
+        void verify();
+        void reset();
+        void reportStat(FILE *f);
+    };
+
+private:
+    class AdvRegionsBins {
+        BitMaskBins bins;
+    public:
+        void registerBin(int regBin) { bins.set(regBin, 1); }
+        int getMinUsedBin(int start) const { return bins.getMinTrue(start); }
+        void reset() { bins.reset(); }
+    };
+    // auxiliary class to atomic maximum request finding
+    class MaxRequestComparator {
+        const Backend *backend;
+    public:
+        MaxRequestComparator(const Backend *be) : backend(be) {}
+        inline bool operator()(size_t oldMaxReq, size_t requestSize) const;
+    };
+
+#if CHECK_ALLOCATION_RANGE
+    // Keep min and max of all addresses requested from OS,
+    // use it for checking memory possibly allocated by replaced allocators
+    // and for debugging purposes. Valid only for default memory pool.
+    class UsedAddressRange {
+        static const uintptr_t ADDRESS_UPPER_BOUND = UINTPTR_MAX;
+
+        uintptr_t   leftBound,
+                    rightBound;
+        MallocMutex mutex;
+    public:
+        // rightBound is zero-initialized
+        void init() { leftBound = ADDRESS_UPPER_BOUND; }
+        void registerAlloc(uintptr_t left, uintptr_t right);
+        void registerFree(uintptr_t left, uintptr_t right);
+        // as only left and right bounds are kept, we can return true
+        // for pointer not allocated by us, if more than single region
+        // was requested from OS
+        bool inRange(void *ptr) const {
+            const uintptr_t p = (uintptr_t)ptr;
+            return leftBound<=p && p<=rightBound;
+        }
+    };
+#else
+    class UsedAddressRange {
+    public:
+        void init() { }
+        void registerAlloc(uintptr_t, uintptr_t) {}
+        void registerFree(uintptr_t, uintptr_t) {}
+        bool inRange(void *) const { return true; }
+    };
+#endif
+
+    ExtMemoryPool   *extMemPool;
+    // used for release every region on pool destroying
+    MemRegionList    regionList;
+
+    CoalRequestQ     coalescQ; // queue of coalescing requests
+    BackendSync      bkndSync;
+    // semaphore protecting adding more more memory from OS
+    MemExtendingSema memExtendingSema;
+    size_t           totalMemSize,
+                     memSoftLimit;
+    UsedAddressRange usedAddrRange;
+    // to keep 1st allocation large than requested, keep bootstrapping status
+    enum {
+        bootsrapMemNotDone = 0,
+        bootsrapMemInitializing,
+        bootsrapMemDone
+    };
+    intptr_t         bootsrapMemStatus;
+    MallocMutex      bootsrapMemStatusMutex;
+
+    // Using of maximal observed requested size allows decrease
+    // memory consumption for small requests and decrease fragmentation
+    // for workloads when small and large allocation requests are mixed.
+    // TODO: decrease, not only increase it
+    size_t           maxRequestedSize;
+
+    // register bins related to advance regions
+    AdvRegionsBins advRegBins;
+    // Storage for splitted FreeBlocks
+    IndexedBins freeLargeBlockBins,
+                freeSlabAlignedBins;
+
+    // Our friends
+    friend class BackendSync;
+
+    /******************************** Backend methods ******************************/
+
+    /*--------------------------- Coalescing functions ----------------------------*/
+    void coalescAndPut(FreeBlock *fBlock, size_t blockSz, bool slabAligned);
+    bool coalescAndPutList(FreeBlock *head, bool forceCoalescQDrop, bool reportBlocksProcessed);
+
+    // Main coalescing operation
+    FreeBlock *doCoalesc(FreeBlock *fBlock, MemRegion **memRegion);
+
+    // Queue for conflicted blocks during coalescing
+    bool scanCoalescQ(bool forceCoalescQDrop);
+    intptr_t blocksInCoalescing() const { return coalescQ.blocksInFly(); }
+
+    /*--------------------- FreeBlock backend accessors ---------------------------*/
+    FreeBlock *genericGetBlock(int num, size_t size, bool slabAligned);
+    void genericPutBlock(FreeBlock *fBlock, size_t blockSz, bool slabAligned);
+
+    // Split the block and return remaining parts to backend if possible
+    FreeBlock *splitBlock(FreeBlock *fBlock, int num, size_t size, bool isAligned, bool needAlignedBlock);
+
+    void removeBlockFromBin(FreeBlock *fBlock);
+
+    // TODO: combine with returnLargeObject
+    void putLargeBlock(LargeMemoryBlock *lmb);
+
+    /*------------------- Starting point for OS allocation ------------------------*/
+    void requestBootstrapMem();
+    FreeBlock *askMemFromOS(size_t totalReqSize, intptr_t startModifiedCnt,
+                            int *lockedBinsThreshold, int numOfLockedBins,
+                            bool *splittable, bool needSlabRegion);
+
+    /*---------------------- Memory regions allocation ----------------------------*/
+    FreeBlock *addNewRegion(size_t size, MemRegionType type, bool addToBin);
+    void releaseRegion(MemRegion *region);
+
+    // TODO: combine in one initMemoryRegion function
+    FreeBlock *findBlockInRegion(MemRegion *region, size_t exactBlockSize);
+    void startUseBlock(MemRegion *region, FreeBlock *fBlock, bool addToBin);
+
+    /*------------------------- Raw memory accessors ------------------------------*/
+    void *allocRawMem(size_t &size);
+    bool freeRawMem(void *object, size_t size);
+
+    /*------------------------------ Cleanup functions ----------------------------*/
+    // Clean all memory from all caches (extMemPool hard cleanup)
+    FreeBlock *releaseMemInCaches(intptr_t startModifiedCnt, int *lockedBinsThreshold, int numOfLockedBins);
+    // Soft heap limit (regular cleanup, then maybe hard cleanup)
+    void releaseCachesToLimit();
+
+    /*---------------------------------- Utility ----------------------------------*/
+    // TODO: move inside IndexedBins class
+    static int sizeToBin(size_t size) {
+        if (size >= maxBinned_HugePage)
+            return HUGE_BIN;
+        else if (size < minBinnedSize)
+            return NO_BIN;
+
+        int bin = (size - minBinnedSize)/LargeObjectCache::largeBlockCacheStep;
+
+        MALLOC_ASSERT(bin < HUGE_BIN, "Invalid size.");
+        return bin;
+    }
+    static bool toAlignedBin(FreeBlock *block, size_t size) {
+        return isAligned((char*)block + size, slabSize) && size >= slabSize;
+    }
+
+public:
+    /*--------------------- Init, reset, destroy, verify  -------------------------*/
+    void init(ExtMemoryPool *extMemoryPool);
+    bool destroy();
+
+    void verify();
+    void reset();
+    bool clean(); // clean on caches cleanup
+
+    /*------------------------- Slab block request --------------------------------*/
+    BlockI *getSlabBlock(int num);
+    void putSlabBlock(BlockI *block);
+
+    /*-------------------------- Large object request -----------------------------*/
+    LargeMemoryBlock *getLargeBlock(size_t size);
+    // TODO: make consistent with getLargeBlock
+    void returnLargeObject(LargeMemoryBlock *lmb);
+
+    /*-------------------------- Backreference memory request ----------------------*/
+    void *getBackRefSpace(size_t size, bool *rawMemUsed);
+    void putBackRefSpace(void *b, size_t size, bool rawMemUsed);
+
+    /*----------------------------- Remap object ----------------------------------*/
+    void *remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment);
+
+    /*---------------------------- Validation -------------------------------------*/
+    bool inUserPool() const;
+    bool ptrCanBeValid(void *ptr) const { return usedAddrRange.inRange(ptr); }
+
+    /*-------------------------- Configuration API --------------------------------*/
+    // Soft heap limit
+    void setRecommendedMaxSize(size_t softLimit) {
+        memSoftLimit = softLimit;
+        releaseCachesToLimit();
+    }
+
+    /*------------------------------- Info ----------------------------------------*/
+    size_t getMaxBinnedSize() const;
+
+    /*-------------------------- Testing, statistics ------------------------------*/
+#if __TBB_MALLOC_WHITEBOX_TEST
+    size_t getTotalMemSize() const { return totalMemSize; }
+#endif
+#if __TBB_MALLOC_BACKEND_STAT
+    void reportStat(FILE *f);
+private:
+    static size_t binToSize(int bin) {
+        MALLOC_ASSERT(bin <= HUGE_BIN, "Invalid bin.");
+
+        return bin*LargeObjectCache::largeBlockCacheStep + minBinnedSize;
+    }
+#endif
+};
+
+#endif // __TBB_backend_H
index d75e0e60faf3897b5932e12405d7dfa521889a93..9016d58a51677617c4013318e0eee8c08b671471 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbbmalloc_internal.h"
index 6f63a18a8b862ecb2f126f38aeae55c73c4e1e99..7d3995a785082a6d2ccae1a8e5202b351c1cd0d0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
@@ -358,17 +354,25 @@ protected:
 class Block : public LocalBlockFields,
               Padding<2*blockHeaderAlignment - sizeof(LocalBlockFields)> {
 public:
-    bool empty() const { return allocatedCount==0 && !isSolidPtr(publicFreeList); }
+    bool empty() const {
+        if (allocatedCount > 0) return false;
+        MALLOC_ASSERT(!isSolidPtr(publicFreeList), ASSERT_TEXT);
+        return true;
+    }
     inline FreeObject* allocate();
     inline FreeObject *allocateFromFreeList();
-    inline bool emptyEnoughToUse();
+
+    inline void adjustFullness();
+    void adjustPositionInBin(Bin* bin = NULL);
+
     bool freeListNonNull() { return freeList; }
     void freePublicObject(FreeObject *objectToFree);
     inline void freeOwnObject(void *object);
     void reset();
-    void privatizePublicFreeList( bool cleanup = false );
+    void privatizePublicFreeList( bool reset = true );
     void restoreBumpPtr();
     void privatizeOrphaned(TLSData *tls, unsigned index);
+    bool readyToShare();
     void shareOrphaned(intptr_t binTag, unsigned index);
     unsigned int getSize() const {
         MALLOC_ASSERT(isStartupAllocObject() || objectSize<minLargeObjectSize,
@@ -417,7 +421,7 @@ protected:
     void cleanBlockHeader();
 
 private:
-    static const float emptyEnoughRatio; /* "Reactivate" a block if this share of its objects is free. */
+    static const float emptyEnoughRatio; /* Threshold on free space needed to "reactivate" a block */
 
     inline FreeObject *allocateFromBumpPtr();
     inline FreeObject *findAllocatedObject(const void *address) const;
@@ -444,27 +448,30 @@ MALLOC_STATIC_ASSERT(sizeof(Block) <= 2*estimatedCacheLineSize,
     "Defining USE_INTERNAL_TID may help to fix it.");
 
 class Bin {
+private:
     Block      *activeBlk;
     Block      *mailbox;
     MallocMutex mailLock;
 
 public:
     inline Block* getActiveBlock() const { return activeBlk; }
-    void resetActiveBlock() { activeBlk = 0; }
+    void resetActiveBlock() { activeBlk = NULL; }
     bool activeBlockUnused() const { return activeBlk && !activeBlk->allocatedCount; }
     inline void setActiveBlock(Block *block);
     inline Block* setPreviousBlockActive();
-    Block* getPublicFreeListBlock();
+    Block* getPrivatizedFreeListBlock();
     void moveBlockToFront(Block *block);
-    void processLessUsedBlock(MemoryPool *memPool, Block *block);
+    bool cleanPublicFreeLists();
+    void processEmptyBlock(Block *block, bool poolTheBlock);
+    void addPublicFreeListBlock(Block* block);
 
     void outofTLSBin(Block* block);
     void verifyTLSBin(size_t size) const;
     void pushTLSBin(Block* block);
 
     void verifyInitState() const {
-        MALLOC_ASSERT( activeBlk == 0, ASSERT_TEXT );
-        MALLOC_ASSERT( mailbox == 0, ASSERT_TEXT );
+        MALLOC_ASSERT( !activeBlk, ASSERT_TEXT );
+        MALLOC_ASSERT( !mailbox, ASSERT_TEXT );
     }
 
     friend void Block::freePublicObject (FreeObject *objectToFree);
@@ -521,6 +528,7 @@ const uint32_t minLargeObjectSize = fittingSize5 + 1;
  * threads memory that are likely in local cache(s) of our CPU.
  */
 class FreeBlockPool {
+private:
     Block      *head;
     int         size;
     Backend    *backend;
@@ -546,6 +554,7 @@ public:
 
 template<int LOW_MARK, int HIGH_MARK>
 class LocalLOCImpl {
+private:
     static const size_t MAX_TOTAL_SIZE = 4*1024*1024;
     // TODO: can single-linked list be faster here?
     LargeMemoryBlock *head,
@@ -580,13 +589,16 @@ public:
     TLSData(MemoryPool *mPool, Backend *bknd) : memPool(mPool), freeSlabBlocks(bknd) {}
     MemoryPool *getMemPool() const { return memPool; }
     Bin* getAllocationBin(size_t size);
-    void release(MemoryPool *mPool);
-    bool externalCleanup(ExtMemoryPool *mPool, bool cleanOnlyUnused) {
+    void release();
+    bool externalCleanup(bool cleanOnlyUnused, bool cleanBins) {
         if (!unused && cleanOnlyUnused) return false;
+        // Heavy operation in terms of synchronization complexity,
+        // should be called only for the current thread
+        bool released = cleanBins ? cleanupBlockBins() : false;
         // both cleanups to be called, and the order is not important
-        return lloc.externalCleanup(mPool) | freeSlabBlocks.externalCleanup();
+        return released | lloc.externalCleanup(&memPool->extMemPool) | freeSlabBlocks.externalCleanup();
     }
-    bool cleanUnusedActiveBlocks(Backend *backend, bool userPool);
+    bool cleanupBlockBins();
     void markUsed() { unused = false; } // called by owner when TLS touched
     void markUnused() { unused =  true; } // can be called by not owner thread
 };
@@ -608,31 +620,31 @@ TLSData *TLSKey::createTLS(MemoryPool *memPool, Backend *backend)
     return tls;
 }
 
-bool TLSData::cleanUnusedActiveBlocks(Backend *backend, bool userPool)
+bool TLSData::cleanupBlockBins()
 {
     bool released = false;
-    // active blocks can be not used, so return them to backend
-    for (uint32_t i=0; i<numBlockBinLimit; i++)
-        if (bin[i].activeBlockUnused()) {
-            Block *block = bin[i].getActiveBlock();
+    for (uint32_t i = 0; i < numBlockBinLimit; i++) {
+        released |= bin[i].cleanPublicFreeLists();
+        // After cleaning public free lists, only the active block might be empty.
+        // Do not use processEmptyBlock because it will just restore bumpPtr.
+        Block *block = bin[i].getActiveBlock();
+        if (block && block->empty()) {
             bin[i].outofTLSBin(block);
-            // slab blocks in user's pools do not have valid backRefIdx
-            if (!userPool)
-                removeBackRef(*(block->getBackRefIdx()));
-            backend->putSlabBlock(block);
-
+            memPool->returnEmptyBlock(block, /*poolTheBlock=*/false);
             released = true;
         }
+    }
     return released;
 }
 
 bool ExtMemoryPool::releaseAllLocalCaches()
 {
-    bool released = allLocalCaches.cleanup(this, /*cleanOnlyUnused=*/false);
+    // Iterate all registred TLS data and clean LLOC and Slab pools
+    bool released = allLocalCaches.cleanup(/*cleanOnlyUnused=*/false);
 
+    // Bins privatization is done only for the current thread
     if (TLSData *tlsData = tlsPointerKey.getThreadMallocTLS())
-        // released only for current thread for now
-        released |= tlsData->cleanUnusedActiveBlocks(&backend, userPool());
+        released |= tlsData->cleanupBlockBins();
 
     return released;
 }
@@ -662,17 +674,15 @@ void AllLocalCaches::unregisterThread(TLSRemote *tls)
     MALLOC_ASSERT(!tls->next || tls->next->next!=tls->next, ASSERT_TEXT);
 }
 
-bool AllLocalCaches::cleanup(ExtMemoryPool *extPool, bool cleanOnlyUnused)
+bool AllLocalCaches::cleanup(bool cleanOnlyUnused)
 {
-    bool total = false;
+    bool released = false;
     {
         MallocMutex::scoped_lock lock(listLock);
-
         for (TLSRemote *curr=head; curr; curr=curr->next)
-            total |= static_cast<TLSData*>(curr)->
-                         externalCleanup(extPool, cleanOnlyUnused);
+            released |= static_cast<TLSData*>(curr)->externalCleanup(cleanOnlyUnused, /*cleanBins=*/false);
     }
-    return total;
+    return released;
 }
 
 void AllLocalCaches::markUnused()
@@ -680,7 +690,7 @@ void AllLocalCaches::markUnused()
     bool locked;
     MallocMutex::scoped_lock lock(listLock, /*block=*/false, &locked);
     if (!locked) // not wait for marking if someone doing something with it
-        return;
+        return; 
 
     for (TLSRemote *curr=head; curr; curr=curr->next)
         static_cast<TLSData*>(curr)->markUnused();
@@ -983,7 +993,7 @@ inline Bin* TLSData::getAllocationBin(size_t size)
 /* Return an empty uninitialized block in a non-blocking fashion. */
 Block *MemoryPool::getEmptyBlock(size_t size)
 {
-    TLSData* tls = extMemPool.tlsPointerKey.getThreadMallocTLS();
+    TLSData* tls = getTLS(/*create=*/false);
     // try to use per-thread cache, if TLS available
     FreeBlockPool::ResOfGet resOfGet = tls?
         tls->freeSlabBlocks.getBlock() : FreeBlockPool::ResOfGet(NULL, false);
@@ -1038,9 +1048,8 @@ void MemoryPool::returnEmptyBlock(Block *block, bool poolTheBlock)
 {
     block->reset();
     if (poolTheBlock) {
-        extMemPool.tlsPointerKey.getThreadMallocTLS()->freeSlabBlocks.returnBlock(block);
-    }
-    else {
+        getTLS(/*create=*/false)->freeSlabBlocks.returnBlock(block);
+    } else {
         // slab blocks in user's pools do not have valid backRefIdx
         if (!extMemPool.userPool())
             removeBackRef(*(block->getBackRefIdx()));
@@ -1139,7 +1148,7 @@ bool MemoryPool::destroy()
 void MemoryPool::onThreadShutdown(TLSData *tlsData)
 {
     if (tlsData) { // might be called for "empty" TLS
-        tlsData->release(this);
+        tlsData->release();
         bootStrapBlocks.free(tlsData);
         clearTLS();
     }
@@ -1241,7 +1250,7 @@ void Bin::outofTLSBin(Block* block)
     verifyTLSBin(size);
 }
 
-Block* Bin::getPublicFreeListBlock()
+Block* Bin::getPrivatizedFreeListBlock()
 {
     Block* block;
     MALLOC_ASSERT( this, ASSERT_TEXT );
@@ -1264,42 +1273,91 @@ Block* Bin::getPublicFreeListBlock()
     if( block ) {
         MALLOC_ASSERT( isSolidPtr(block->publicFreeList), ASSERT_TEXT );
         block->privatizePublicFreeList();
+        block->adjustPositionInBin(this);
     }
     return block;
 }
 
-bool Block::emptyEnoughToUse()
+void Bin::addPublicFreeListBlock(Block* block)
 {
-    const float threshold = (slabSize - sizeof(Block)) * (1-emptyEnoughRatio);
+    MallocMutex::scoped_lock scoped_cs(mailLock);
+    block->nextPrivatizable = mailbox;
+    mailbox = block;
+}
+
+// Process publicly freed objects in all blocks and return empty blocks
+// to the backend in order to reduce overall footprint.
+bool Bin::cleanPublicFreeLists()
+{
+    Block* block;
+    if (!FencedLoad((intptr_t&)mailbox))
+        return false;
+    else {
+        // Grab all the blocks in the mailbox
+        MallocMutex::scoped_lock scoped_cs(mailLock);
+        block = mailbox;
+        mailbox = NULL;
+    }
+    bool released = false;
+    while (block) {
+        MALLOC_ASSERT( block->isOwnedByCurrentThread(), ASSERT_TEXT );
+        Block* tmp = block->nextPrivatizable;
+        block->nextPrivatizable = (Block*) this;
+        block->privatizePublicFreeList();
+        if (block->empty()) {
+            processEmptyBlock(block, /*poolTheBlock=*/false);
+            released = true;
+        } else
+            block->adjustPositionInBin(this);
+        block = tmp;
+    }
+    return released;
+}
+
+void Block::adjustFullness()
+{
+    const float threshold = (slabSize - sizeof(Block)) * (1 - emptyEnoughRatio);
 
     if (bumpPtr) {
         /* If we are still using a bump ptr for this block it is empty enough to use. */
         STAT_increment(getThreadId(), getIndex(objectSize), examineEmptyEnough);
         isFull = false;
-        return 1;
+        return;
     }
 
     /* allocatedCount shows how many objects in the block are in use; however it still counts
-       blocks freed by other threads; so prior call to privatizePublicFreeList() is recommended */
-    isFull = (allocatedCount*objectSize > threshold)? true: false;
+     * blocks freed by other threads; so prior call to privatizePublicFreeList() is recommended */
+    isFull = (allocatedCount*objectSize > threshold) ? true : false;
 #if COLLECT_STATISTICS
     if (isFull)
         STAT_increment(getThreadId(), getIndex(objectSize), examineNotEmpty);
     else
         STAT_increment(getThreadId(), getIndex(objectSize), examineEmptyEnough);
 #endif
-    return !isFull;
+}
+
+// This method resides in class Block, and not in class Bin, in order to avoid
+// calling getAllocationBin on a reasonably hot path in Block::freeOwnObject
+void Block::adjustPositionInBin(Bin* bin/*=NULL*/)
+{
+    bool fullBefore = isFull;
+    adjustFullness();
+    if (fullBefore && !isFull) {
+        if (!bin)
+            bin = tlsPtr->getAllocationBin(objectSize);
+        bin->moveBlockToFront(this);
+    }
 }
 
 /* Restore the bump pointer for an empty block that is planned to use */
 void Block::restoreBumpPtr()
 {
     MALLOC_ASSERT( allocatedCount == 0, ASSERT_TEXT );
-    MALLOC_ASSERT( publicFreeList == NULL, ASSERT_TEXT );
+    MALLOC_ASSERT( !isSolidPtr(publicFreeList), ASSERT_TEXT );
     STAT_increment(getThreadId(), getIndex(objectSize), freeRestoreBumpPtr);
     bumpPtr = (FreeObject *)((uintptr_t)this + slabSize - objectSize);
     freeList = NULL;
-    isFull = 0;
+    isFull = false;
 }
 
 void Block::freeOwnObject(void *object)
@@ -1315,19 +1373,14 @@ void Block::freeOwnObject(void *object)
         STAT_increment(getThreadId(), getIndex(objectSize), freeToActiveBlock);
 #endif
     if (empty()) {
-        // The bump pointer is about to be restored for the block,
-        // no need to find objectToFree here (this is costly).
-
-        // if the last object of a slab is freed, the slab cannot be marked full
+        // If the last object of a slab is freed, the slab cannot be marked full
         MALLOC_ASSERT(!isFull, ASSERT_TEXT);
-        tlsPtr->getAllocationBin(objectSize)->processLessUsedBlock(poolPtr, this);
-    } else {
+        tlsPtr->getAllocationBin(objectSize)->processEmptyBlock(this, /*poolTheBlock=*/true);
+    } else { // hot path
         FreeObject *objectToFree = findObjectToFree(object);
         objectToFree->next = freeList;
         freeList = objectToFree;
-
-        if (isFull && emptyEnoughToUse())
-            tlsPtr->getAllocationBin(objectSize)->moveBlockToFront(this);
+        adjustPositionInBin();
     }
 }
 
@@ -1365,30 +1418,25 @@ void Block::freePublicObject (FreeObject *objectToFree)
         if( !isNotForUse(nextPrivatizable) ) {
             MALLOC_ASSERT( nextPrivatizable!=NULL, ASSERT_TEXT );
             Bin* theBin = (Bin*) nextPrivatizable;
-            MallocMutex::scoped_lock scoped_cs(theBin->mailLock);
-            nextPrivatizable = theBin->mailbox;
-            theBin->mailbox = this;
+            theBin->addPublicFreeListBlock(this);
         }
     }
     STAT_increment(getThreadId(), ThreadCommonCounters, freeToOtherThread);
     STAT_increment(ownerTid, getIndex(objectSize), freeByOtherThread);
 }
 
-void Block::privatizePublicFreeList( bool cleanup )
+// Make objects freed by other threads available for use again
+void Block::privatizePublicFreeList( bool reset )
 {
-    FreeObject *temp, *localPublicFreeList;
-    const intptr_t endMarker = cleanup? UNUSABLE : 0;
+    FreeObject *localPublicFreeList;
+    // If reset is false, publicFreeList should not be zeroed but set to UNUSABLE
+    // to properly synchronize with other threads freeing objects to this slab.
+    const intptr_t endMarker = reset ? 0 : UNUSABLE;
 
-    // During cleanup of orphaned blocks, the calling thread is not registered as the owner 
-    MALLOC_ASSERT( cleanup || isOwnedByCurrentThread(), ASSERT_TEXT );
+    // Only the owner thread may reset the pointer to NULL
+    MALLOC_ASSERT( isOwnedByCurrentThread() || !reset, ASSERT_TEXT );
 #if FREELIST_NONBLOCKING
-    temp = publicFreeList;
-    do {
-        localPublicFreeList = temp;
-        temp = (FreeObject*)AtomicCompareExchange( (intptr_t&)publicFreeList,
-                                        endMarker, (intptr_t)localPublicFreeList);
-        // no backoff necessary because trying to make change, not waiting for a change
-    } while( temp != localPublicFreeList );
+    localPublicFreeList = (FreeObject*)AtomicFetchStore( &publicFreeList, endMarker );
 #else
     STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);
     {
@@ -1396,17 +1444,17 @@ void Block::privatizePublicFreeList( bool cleanup )
         localPublicFreeList = publicFreeList;
         publicFreeList = endMarker;
     }
-    temp = localPublicFreeList;
 #endif
     MALLOC_ITT_SYNC_ACQUIRED(&publicFreeList);
+    MALLOC_ASSERT( !(reset && isNotForUse(publicFreeList)), ASSERT_TEXT );
 
-     // publicFreeList must have been UNUSABLE (possible for orphaned blocks) or valid, but not NULL
+    // publicFreeList must have been UNUSABLE or valid, but not NULL
     MALLOC_ASSERT( localPublicFreeList!=NULL, ASSERT_TEXT );
-    MALLOC_ASSERT( localPublicFreeList==temp, ASSERT_TEXT );
-    if( isSolidPtr(temp) ) {
+    if( isSolidPtr(localPublicFreeList) ) {
         MALLOC_ASSERT( allocatedCount <= (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT );
         /* other threads did not change the counter freeing our blocks */
         allocatedCount--;
+        FreeObject *temp = localPublicFreeList;
         while( isSolidPtr(temp->next) ){ // the list will end with either NULL or UNUSABLE
             temp = temp->next;
             allocatedCount--;
@@ -1433,34 +1481,41 @@ void Block::privatizeOrphaned(TLSData *tls, unsigned index)
     nextPrivatizable = (Block*)bin;
     // the next call is required to change publicFreeList to 0
     privatizePublicFreeList();
-    if( allocatedCount ) {
-        emptyEnoughToUse(); // check its fullness and set result->isFull
-    } else {
+    if( empty() ) {
         restoreBumpPtr();
+    } else {
+        adjustFullness(); // check the block fullness and set isFull
     }
     MALLOC_ASSERT( !isNotForUse(publicFreeList), ASSERT_TEXT );
 }
 
+
+bool Block::readyToShare()
+{
+    void* oldval;
+#if FREELIST_NONBLOCKING
+    oldval = (void*)AtomicCompareExchange((intptr_t&)publicFreeList, UNUSABLE, 0);
+#else
+    STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);
+    {
+        MallocMutex::scoped_lock scoped_cs(publicFreeListLock);
+        if ( (oldval=publicFreeList)==NULL )
+            (intptr_t&)(publicFreeList) = UNUSABLE;
+    }
+#endif
+    return oldval==NULL;
+}
+
 void Block::shareOrphaned(intptr_t binTag, unsigned index)
 {
     MALLOC_ASSERT( binTag, ASSERT_TEXT );
     STAT_increment(getThreadId(), index, freeBlockPublic);
     markOrphaned();
-    // need to set publicFreeList to non-zero, so other threads
-    // will not change nextPrivatizable and it can be zeroed.
     if ((intptr_t)nextPrivatizable==binTag) {
-        void* oldval;
-#if FREELIST_NONBLOCKING
-        oldval = (void*)AtomicCompareExchange((intptr_t&)publicFreeList, UNUSABLE, 0);
-#else
-        STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);
-        {
-            MallocMutex::scoped_lock scoped_cs(publicFreeListLock);
-            if ( (oldval=publicFreeList)==NULL )
-                (intptr_t&)(publicFreeList) = UNUSABLE;
-        }
-#endif
-        if ( oldval!=NULL ) {
+        // First check passed: the block is not in mailbox yet.
+        // Need to set publicFreeList to non-zero, so other threads
+        // will not change nextPrivatizable and it can be zeroed.
+        if ( !readyToShare() ) {
             // another thread freed an object; we need to wait until it finishes.
             // There is no need for exponential backoff, as the wait here is not for a lock;
             // but need to yield, so the thread we wait has a chance to run.
@@ -1473,8 +1528,6 @@ void Block::shareOrphaned(intptr_t binTag, unsigned index)
                 }
             }
         }
-    } else {
-        MALLOC_ASSERT( isSolidPtr(publicFreeList), ASSERT_TEXT );
     }
     MALLOC_ASSERT( publicFreeList!=NULL, ASSERT_TEXT );
     // now it is safe to change our data
@@ -1491,7 +1544,7 @@ void Block::cleanBlockHeader()
     previous = NULL;
     freeList = NULL;
     allocatedCount = 0;
-    isFull = 0;
+    isFull = false;
     tlsPtr = NULL;
 
     publicFreeList = NULL;
@@ -1545,20 +1598,20 @@ void OrphanedBlocks::reset()
 
 bool OrphanedBlocks::cleanup(Backend* backend)
 {
-    bool result = false;
+    bool released = false;
     for (uint32_t i=0; i<numBlockBinLimit; i++) {
         Block* block = bins[i].grab();
         MALLOC_ITT_SYNC_ACQUIRED(bins+i);
         while (block) {
             Block* next = block->next;
-            block->privatizePublicFreeList( /*cleanup=*/true );
+            block->privatizePublicFreeList( /*reset=*/false ); // do not set publicFreeList to NULL
             if (block->empty()) {
                 block->reset();
                 // slab blocks in user's pools do not have valid backRefIdx
                 if (!backend->inUserPool())
                     removeBackRef(*(block->getBackRefIdx()));
                 backend->putSlabBlock(block);
-                result = true;
+                released = true;
             } else {
                 MALLOC_ITT_SYNC_RELEASING(bins+i);
                 bins[i].push(block);
@@ -1566,7 +1619,7 @@ bool OrphanedBlocks::cleanup(Backend* backend)
             block = next;
         }
     }
-    return result;
+    return released;
 }
 
 FreeBlockPool::ResOfGet FreeBlockPool::getBlock()
@@ -1617,7 +1670,7 @@ void FreeBlockPool::returnBlock(Block *block)
 bool FreeBlockPool::externalCleanup()
 {
     Block *helper;
-    bool nonEmpty = false;
+    bool released = false;
 
     for (Block *currBl=(Block*)AtomicFetchStore(&head, 0); currBl; currBl=helper) {
         helper = currBl->next;
@@ -1625,9 +1678,9 @@ bool FreeBlockPool::externalCleanup()
         if (!backend->inUserPool())
             removeBackRef(currBl->backRefIdx);
         backend->putSlabBlock(currBl);
-        nonEmpty = true;
+        released = true;
     }
-    return nonEmpty;
+    return released;
 }
 
 /* Prepare the block for returning to FreeBlockPool */
@@ -1661,7 +1714,7 @@ inline Block* Bin::setPreviousBlockActive()
     MALLOC_ASSERT( activeBlk, ASSERT_TEXT );
     Block* temp = activeBlk->previous;
     if( temp ) {
-        MALLOC_ASSERT( temp->isFull == 0, ASSERT_TEXT );
+        MALLOC_ASSERT( !(temp->isFull), ASSERT_TEXT );
         activeBlk = temp;
     }
     return temp;
@@ -1696,10 +1749,10 @@ FreeObject *Block::findObjectToFree(const void *object) const
     return objectToFree;
 }
 
-void TLSData::release(MemoryPool *mPool)
+void TLSData::release()
 {
-    mPool->extMemPool.allLocalCaches.unregisterThread(this);
-    externalCleanup(&mPool->extMemPool, /*cleanOnlyUnused=*/false);
+    memPool->extMemPool.allLocalCaches.unregisterThread(this);
+    externalCleanup(/*cleanOnlyUnused=*/false, /*cleanBins=*/false);
 
     for (unsigned index = 0; index < numBlockBins; index++) {
         Block *activeBlk = bin[index].getActiveBlock();
@@ -1710,9 +1763,9 @@ void TLSData::release(MemoryPool *mPool)
             Block *threadBlock = threadlessBlock->previous;
             if (threadlessBlock->empty()) {
                 /* we destroy the thread, so not use its block pool */
-                mPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false);
+                memPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false);
             } else {
-                mPool->extMemPool.orphanedBlocks.put(intptr_t(bin+index), threadlessBlock);
+                memPool->extMemPool.orphanedBlocks.put(intptr_t(bin+index), threadlessBlock);
             }
             threadlessBlock = threadBlock;
         }
@@ -1721,9 +1774,9 @@ void TLSData::release(MemoryPool *mPool)
             Block *threadBlock = threadlessBlock->next;
             if (threadlessBlock->empty()) {
                 /* we destroy the thread, so not use its block pool */
-                mPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false);
+                memPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false);
             } else {
-                mPool->extMemPool.orphanedBlocks.put(intptr_t(bin+index), threadlessBlock);
+                memPool->extMemPool.orphanedBlocks.put(intptr_t(bin+index), threadlessBlock);
             }
             threadlessBlock = threadBlock;
         }
@@ -2094,7 +2147,7 @@ inline FreeObject* Block::allocate()
     MALLOC_ASSERT( !bumpPtr, ASSERT_TEXT );
 
     /* the block is considered full. */
-    isFull = 1;
+    isFull = true;
     return NULL;
 }
 
@@ -2123,12 +2176,12 @@ void Bin::moveBlockToFront(Block *block)
     pushTLSBin(block);
 }
 
-void Bin::processLessUsedBlock(MemoryPool *memPool, Block *block)
+void Bin::processEmptyBlock(Block *block, bool poolTheBlock)
 {
     if (block != activeBlk) {
-        /* We are not actively using this block; return it to the general block pool */
+        /* We are not using this block; return it to the pool */
         outofTLSBin(block);
-        memPool->returnEmptyBlock(block, /*poolTheBlock=*/true);
+        block->getMemPool()->returnEmptyBlock(block, poolTheBlock);
     } else {
         /* all objects are free - let's restore the bump pointer */
         block->restoreBumpPtr();
@@ -2522,11 +2575,8 @@ static void *internalPoolMalloc(MemoryPool* memPool, size_t size)
     /*
      * else privatize publicly freed objects in some block and allocate from it
      */
-    mallocBlock = bin->getPublicFreeListBlock();
+    mallocBlock = bin->getPrivatizedFreeListBlock();
     if (mallocBlock) {
-        if (mallocBlock->emptyEnoughToUse()) {
-            bin->moveBlockToFront(mallocBlock);
-        }
         MALLOC_ASSERT( mallocBlock->freeListNonNull(), ASSERT_TEXT );
         if ( FreeObject *result = mallocBlock->allocateFromFreeList() )
             return result;
@@ -3237,16 +3287,18 @@ extern "C" int scalable_allocation_command(int cmd, void *param)
 {
     if (param)
         return TBBMALLOC_INVALID_PARAM;
+
+    bool released = false;
     switch(cmd) {
     case TBBMALLOC_CLEAN_THREAD_BUFFERS:
         if (TLSData *tls = defaultMemPool->getTLS(/*create=*/false))
-            return tls->externalCleanup(&defaultMemPool->extMemPool,
-                                        /*cleanOnlyUnused=*/false)?
-                TBBMALLOC_OK : TBBMALLOC_NO_EFFECT;
-        return TBBMALLOC_NO_EFFECT;
+            released = tls->externalCleanup(/*cleanOnlyUsed*/false, /*cleanBins=*/true);
+        break;
     case TBBMALLOC_CLEAN_ALL_BUFFERS:
-        return defaultMemPool->extMemPool.hardCachesCleanup()?
-            TBBMALLOC_OK : TBBMALLOC_NO_EFFECT;
+        released = defaultMemPool->extMemPool.hardCachesCleanup();
+        break;
+    default:
+        return TBBMALLOC_INVALID_PARAM;
     }
-    return TBBMALLOC_INVALID_PARAM;
+    return released ? TBBMALLOC_OK : TBBMALLOC_NO_EFFECT;
 }
index 48ee40f3af996648478e52660c0adff4ea5b8464..4fde01d7058e9bbc4b9448ef55c1cd8c6b4fb310 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbbmalloc_internal.h"
index c971d346944684d69ffcd44020566aa2f05b64c3..99953d54cdecc804b40387e57ac593489b7c0f89 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index d0f06c6c4297b07c71a56a3759b27f02927ff4a0..c6dd05c73ea5d9e3a421f4f8dbf9515ccb2f5eb8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 684e7c0ae0b34fb8ec0fb6771e13b026c64626cc..4f121a8497eadad7a0bef287aec671b5e9fc8ee8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 18ebd2679a6d270fedad9d479c78a3069f0a807b..3ad09cb8e880aec2262d3e07ffd0b1394fe9640c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 684e7c0ae0b34fb8ec0fb6771e13b026c64626cc..4f121a8497eadad7a0bef287aec671b5e9fc8ee8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index e850a9bf9b4d27a558fbc3af629bf6836808f4ec..64015a2fa1764cb3bc17da441ad458b09691e8ab 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 7de9b2584072eb376a6341c1496c9a24bcd297e4..0a9d0e3db5cefab189d6ecbfa6ecf7172d294354 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 _scalable_calloc
index 7de9b2584072eb376a6341c1496c9a24bcd297e4..0a9d0e3db5cefab189d6ecbfa6ecf7172d294354 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 _scalable_calloc
index 5d713fe99c8f0220cd13fc86d933d901e1374421..2e1708b08cb55725310d0d47da69459d3f2cd82e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __linux__ && !__ANDROID__
index c0ffc087027b7dde8cba374c115d29c9027a25ae..d61eb889687893ce4fc5b6ebcc80e0ce4275fb56 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef _TBB_malloc_proxy_H_
index 62ae3b65b10ed39065ecc84eb33ff77ebdca423d..39790db71621957aedb06de8732b3f4263706e77 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // The original source for this code is
index 269ef7d93224bb5d26f2b119dfab62b168af40de..396404cfef8b9e0d977a330fdd8bdfb59b34fea5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_shared_utils_H
index cc5683786a3b4f980033d44e770c3208e0403396..90c4fcfac09ac885fcf61d9c2199b267b070a783 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 2a7486eec2c54adf77b5e934c1a588331b378f96..3549db620def1eaaa86ee5e6f4d5ca276d01563b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_function_replacement_H
index bf978a74f0ba9c9bde14680735e148947eabcd31..7de858c717a3a630fe087ecda58c904664ff6ffd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "TypeDefinitions.h" // Customize.h and proxy.h get included
index 9cbc1310c8fdaa5a6d81e4f6540452c1fd738666..6a8b169839a0fe659f9de7a849c931f6041844b0 100644 (file)
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-//
-//
-//
 
 // Microsoft Visual C++ generated resource script.
 //
index 943973dc3e5e4efd7c650a9c84b6944ba6da5d52..e0464b1d8422644c5817c30fdf4e0b3c5ec3bf09 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbbmalloc_internal_H
@@ -250,7 +246,7 @@ class AllLocalCaches {
 public:
     void registerThread(TLSRemote *tls);
     void unregisterThread(TLSRemote *tls);
-    bool cleanup(ExtMemoryPool *extPool, bool cleanOnlyUnused);
+    bool cleanup(bool cleanOnlyUnused);
     void markUnused();
     void reset() { head = NULL; }
 };
@@ -551,338 +547,8 @@ struct LargeMemoryBlock : public BlockI {
     BackRefIdx        backRefIdx;    // cached here, used copy is in LargeObjectHdr
 };
 
-// global state of blocks currently in processing
-class BackendSync {
-    // Class instances should reside in zero-initialized memory!
-    // The number of blocks currently removed from a bin and not returned back
-    intptr_t inFlyBlocks;         // to another
-    intptr_t binsModifications;   // incremented on every bin modification
-    Backend *backend;
-public:
-    void init(Backend *b) { backend = b; }
-    void blockConsumed() { AtomicIncrement(inFlyBlocks); }
-    void binsModified() { AtomicIncrement(binsModifications); }
-    void blockReleased() {
-#if __TBB_MALLOC_BACKEND_STAT
-        MALLOC_ITT_SYNC_RELEASING(&inFlyBlocks);
-#endif
-        AtomicIncrement(binsModifications);
-        intptr_t prev = AtomicAdd(inFlyBlocks, -1);
-        MALLOC_ASSERT(prev > 0, ASSERT_TEXT);
-        suppress_unused_warning(prev);
-    }
-    intptr_t getNumOfMods() const { return FencedLoad(binsModifications); }
-    // return true if need re-do the blocks search
-    inline bool waitTillBlockReleased(intptr_t startModifiedCnt);
-};
-
-class CoalRequestQ { // queue of free blocks that coalescing was delayed
-private:
-    FreeBlock   *blocksToFree;
-    BackendSync *bkndSync;
-    // counted blocks in blocksToFree and that are leaved blocksToFree
-    // and still in active coalescing
-    intptr_t     inFlyBlocks;
-public:
-    void init(BackendSync *bSync) { bkndSync = bSync; }
-    FreeBlock *getAll(); // return current list of blocks and make queue empty
-    void putBlock(FreeBlock *fBlock);
-    inline void blockWasProcessed();
-    intptr_t blocksInFly() const { return FencedLoad(inFlyBlocks); }
-};
-
-class MemExtendingSema {
-    intptr_t     active;
-public:
-    bool wait() {
-        bool rescanBins = false;
-        // up to 3 threads can add more memory from OS simultaneously,
-        // rest of threads have to wait
-        for (;;) {
-            intptr_t prevCnt = FencedLoad(active);
-            if (prevCnt < 3) {
-                intptr_t n = AtomicCompareExchange(active, prevCnt+1, prevCnt);
-                if (n == prevCnt)
-                    break;
-            } else {
-                SpinWaitWhileEq(active, prevCnt);
-                rescanBins = true;
-                break;
-            }
-        }
-        return rescanBins;
-    }
-    void signal() { AtomicAdd(active, -1); }
-};
-
-enum MemRegionType {
-    // The region does not guarantee the block size.
-    MEMREG_FLEXIBLE_SIZE = 0,
-    // The region can hold exact number of blocks with the size of the
-    // first reqested block.
-    MEMREG_SEVERAL_BLOCKS,
-    // The region holds only one block with a reqested size.
-    MEMREG_ONE_BLOCK
-};
-
-class MemRegionList {
-    MallocMutex regionListLock;
-public:
-    MemRegion  *head;
-    void add(MemRegion *r);
-    void remove(MemRegion *r);
-    int reportStat(FILE *f);
-};
-
-class Backend {
-private:
-/* Blocks in range [minBinnedSize; getMaxBinnedSize()] are kept in bins,
-   one region can contains several blocks. Larger blocks are allocated directly
-   and one region always contains one block.
-*/
-    enum {
-        minBinnedSize = 8*1024UL,
-        /*   If huge pages are available, maxBinned_HugePage used.
-             If not, maxBinned_SmallPage is the threshold.
-             TODO: use pool's granularity for upper bound setting.*/
-        maxBinned_SmallPage = 1024*1024UL,
-        // TODO: support other page sizes
-        maxBinned_HugePage = 4*1024*1024UL
-    };
-    enum {
-        VALID_BLOCK_IN_BIN = 1 // valid block added to bin, not returned as result
-    };
-public:
-    static const int freeBinsNum =
-        (maxBinned_HugePage-minBinnedSize)/LargeObjectCache::largeBlockCacheStep + 1;
-
-    // if previous access missed per-thread slabs pool,
-    // allocate numOfSlabAllocOnMiss blocks in advance
-    static const int numOfSlabAllocOnMiss = 2;
-
-    enum {
-        NO_BIN = -1,
-        // special bin for blocks >= maxBinned_HugePage, blocks go to this bin
-        // when pool is created with keepAllMemory policy
-        // TODO: currently this bin is scanned using "1st fit", as it accumulates
-        // blocks of different sizes, "best fit" is preferred in terms of fragmentation
-        HUGE_BIN = freeBinsNum-1
-    };
-
-    // Bin keeps 2-linked list of free blocks. It must be 2-linked
-    // because during coalescing a block it's removed from a middle of the list.
-    struct Bin {
-        FreeBlock   *head,
-                    *tail;
-        MallocMutex  tLock;
-
-        void removeBlock(FreeBlock *fBlock);
-        void reset() { head = tail = 0; }
-        bool empty() const { return !head; }
-
-        size_t countFreeBlocks();
-        size_t reportFreeBlocks(FILE *f);
-        void reportStat(FILE *f);
-    };
-
-    typedef BitMaskMin<Backend::freeBinsNum> BitMaskBins;
-
-    // array of bins supplemented with bitmask for fast finding of non-empty bins
-    class IndexedBins {
-        BitMaskBins bitMask;
-        Bin         freeBins[Backend::freeBinsNum];
-        FreeBlock *getFromBin(int binIdx, BackendSync *sync, size_t size,
-                              bool resSlabAligned, bool alignedBin, bool wait,
-                              int *resLocked);
-    public:
-        FreeBlock *findBlock(int nativeBin, BackendSync *sync, size_t size,
-                             bool resSlabAligned, bool alignedBin, int *numOfLockedBins);
-        bool tryReleaseRegions(int binIdx, Backend *backend);
-        void lockRemoveBlock(int binIdx, FreeBlock *fBlock);
-        void addBlock(int binIdx, FreeBlock *fBlock, size_t blockSz, bool addToTail);
-        bool tryAddBlock(int binIdx, FreeBlock *fBlock, bool addToTail);
-        int getMinNonemptyBin(unsigned startBin) const {
-            int p = bitMask.getMinTrue(startBin);
-            return p == -1 ? Backend::freeBinsNum : p;
-        }
-        void verify();
-        void reset();
-        void reportStat(FILE *f);
-    };
-
-private:
-    class AdvRegionsBins {
-        BitMaskBins bins;
-    public:
-        void registerBin(int regBin) { bins.set(regBin, 1); }
-        int getMinUsedBin(int start) const { return bins.getMinTrue(start); }
-        void reset() { bins.reset(); }
-    };
-    // auxiliary class to atomic maximum request finding
-    class MaxRequestComparator {
-        const Backend *backend;
-    public:
-        MaxRequestComparator(const Backend *be) : backend(be) {}
-        inline bool operator()(size_t oldMaxReq, size_t requestSize) const;
-    };
-
-#if CHECK_ALLOCATION_RANGE
-    // Keep min and max of all addresses requested from OS,
-    // use it for checking memory possibly allocated by replaced allocators
-    // and for debugging purposes. Valid only for default memory pool.
-    class UsedAddressRange {
-        static const uintptr_t ADDRESS_UPPER_BOUND = UINTPTR_MAX;
-
-        uintptr_t   leftBound,
-                    rightBound;
-        MallocMutex mutex;
-    public:
-        // rightBound is zero-initialized
-        void init() { leftBound = ADDRESS_UPPER_BOUND; }
-        void registerAlloc(uintptr_t left, uintptr_t right);
-        void registerFree(uintptr_t left, uintptr_t right);
-        // as only left and right bounds are kept, we can return true
-        // for pointer not allocated by us, if more than single region
-        // was requested from OS
-        bool inRange(void *ptr) const {
-            const uintptr_t p = (uintptr_t)ptr;
-            return leftBound<=p && p<=rightBound;
-        }
-    };
-#else
-    class UsedAddressRange {
-    public:
-        void init() { }
-        void registerAlloc(uintptr_t, uintptr_t) {}
-        void registerFree(uintptr_t, uintptr_t) {}
-        bool inRange(void *) const { return true; }
-    };
-#endif
-
-    ExtMemoryPool   *extMemPool;
-    // used for release every region on pool destroying
-    MemRegionList    regionList;
-
-    CoalRequestQ     coalescQ; // queue of coalescing requests
-    BackendSync      bkndSync;
-    // semaphore protecting adding more more memory from OS
-    MemExtendingSema memExtendingSema;
-    size_t           totalMemSize,
-                     memSoftLimit;
-    UsedAddressRange usedAddrRange;
-    // to keep 1st allocation large than requested, keep bootstrapping status
-    enum {
-        bootsrapMemNotDone = 0,
-        bootsrapMemInitializing,
-        bootsrapMemDone
-    };
-    intptr_t         bootsrapMemStatus;
-    MallocMutex      bootsrapMemStatusMutex;
-
-    // Using of maximal observed requested size allows decrease
-    // memory consumption for small requests and decrease fragmentation
-    // for workloads when small and large allocation requests are mixed.
-    // TODO: decrease, not only increase it
-    size_t           maxRequestedSize;
-
-    FreeBlock *addNewRegion(size_t size, MemRegionType type, bool addToBin);
-    FreeBlock *findBlockInRegion(MemRegion *region, size_t exactBlockSize);
-    void startUseBlock(MemRegion *region, FreeBlock *fBlock, bool addToBin);
-    void releaseRegion(MemRegion *region);
-
-    FreeBlock *releaseMemInCaches(intptr_t startModifiedCnt,
-                                  int *lockedBinsThreshold, int numOfLockedBins);
-    void requestBootstrapMem();
-    FreeBlock *askMemFromOS(size_t totalReqSize, intptr_t startModifiedCnt,
-                            int *lockedBinsThreshold, int numOfLockedBins,
-                            bool *splittable);
-    FreeBlock *genericGetBlock(int num, size_t size, bool resSlabAligned);
-    void genericPutBlock(FreeBlock *fBlock, size_t blockSz);
-    FreeBlock *splitUnalignedBlock(FreeBlock *fBlock, int num, size_t size,
-                              bool needAlignedRes);
-    FreeBlock *splitAlignedBlock(FreeBlock *fBlock, int num, size_t size,
-                            bool needAlignedRes);
-
-    FreeBlock *doCoalesc(FreeBlock *fBlock, MemRegion **memRegion);
-    bool coalescAndPutList(FreeBlock *head, bool forceCoalescQDrop, bool reportBlocksProcessed);
-    void coalescAndPut(FreeBlock *fBlock, size_t blockSz);
-
-    void removeBlockFromBin(FreeBlock *fBlock);
-
-    void *allocRawMem(size_t &size);
-    bool freeRawMem(void *object, size_t size);
-
-    void putLargeBlock(LargeMemoryBlock *lmb);
-    void releaseCachesToLimit();
-public:
-    bool scanCoalescQ(bool forceCoalescQDrop);
-    intptr_t blocksInCoalescing() const { return coalescQ.blocksInFly(); }
-    void verify();
-    void init(ExtMemoryPool *extMemoryPool);
-    void reset();
-    bool destroy();
-    bool clean(); // clean on caches cleanup
-    void reportStat(FILE *f);
-
-    BlockI *getSlabBlock(int num) {
-        BlockI *b = (BlockI*)
-            genericGetBlock(num, slabSize, /*resSlabAligned=*/true);
-        MALLOC_ASSERT(isAligned(b, slabSize), ASSERT_TEXT);
-        return b;
-    }
-    void putSlabBlock(BlockI *block) {
-        genericPutBlock((FreeBlock *)block, slabSize);
-    }
-    void *getBackRefSpace(size_t size, bool *rawMemUsed);
-    void putBackRefSpace(void *b, size_t size, bool rawMemUsed);
-
-    bool inUserPool() const;
-
-    LargeMemoryBlock *getLargeBlock(size_t size);
-    void returnLargeObject(LargeMemoryBlock *lmb);
-
-    void *remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment);
-
-    void setRecommendedMaxSize(size_t softLimit) {
-        memSoftLimit = softLimit;
-        releaseCachesToLimit();
-    }
-    size_t getMaxBinnedSize() const;
-
-    bool ptrCanBeValid(void *ptr) const { return usedAddrRange.inRange(ptr); }
-
-#if __TBB_MALLOC_WHITEBOX_TEST
-    size_t getTotalMemSize() const { return totalMemSize; }
-#endif
-private:
-    static int sizeToBin(size_t size) {
-        if (size >= maxBinned_HugePage)
-            return HUGE_BIN;
-        else if (size < minBinnedSize)
-            return NO_BIN;
-
-        int bin = (size - minBinnedSize)/LargeObjectCache::largeBlockCacheStep;
-
-        MALLOC_ASSERT(bin < HUGE_BIN, "Invalid size.");
-        return bin;
-    }
-#if __TBB_MALLOC_BACKEND_STAT
-    static size_t binToSize(int bin) {
-        MALLOC_ASSERT(bin <= HUGE_BIN, "Invalid bin.");
-
-        return bin*LargeObjectCache::largeBlockCacheStep + minBinnedSize;
-    }
-#endif
-    static bool toAlignedBin(FreeBlock *block, size_t size) {
-        return isAligned((char*)block+size, slabSize)
-            && size >= slabSize;
-    }
-
-    // register bins related to advance regions
-    AdvRegionsBins advRegBins;
-    IndexedBins freeLargeBins,
-                freeAlignedBins;
-};
+// Classes and methods for backend.cpp
+#include "backend.h"
 
 // An TBB allocator mode that can be controlled by user
 // via API/environment variable. Must be placed in zero-initialized memory.
index 3df23e26ac57601d91b9698427e0407450ec6d2d..d3cfe29ec4bc415db3c34a4174a813143c61e9f0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_tbbmalloc_internal_api_H
index aab8a79258c56e295def2a95d03afd86fb2a48d2..392371990673868b4120adcc07e6004392ee5c91 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index 879baa604f39397fd60e14586492762fe15a1193..9822ca0eb1ae2962ea7a2be7ad45654ea2ad1792 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 EXPORTS
 
index 94bea4e8f0154e1665003de62aa3b43dd13984f3..c5400d4e8a65f05d53ea8011bc6e72ca4319fd0e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 {
index b0a20f70cfbadbed6be34d0367347a96ec8b688c..33ee6e59bb241b763050216bd0fccd55aa80904e 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 EXPORTS
 
index de0725e9791f0f4d84f3161dab83539aeefaa8c8..11b8dac5f2c54a2d313e3eb22ee3d56577c112b4 100644 (file)
 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
-;
-;
-;
-;
 
 // __TBB_STRING macro defined in "tbb_stddef.h". However, we cannot include "tbb_stddef.h"
 // because it contains a lot of C/C++ definitions. So, we have to define __TBB_STRING here:
index c14d54b41ab9769278b18b1c6d09ba9415dfe488..eba68bfa269d3df3d58877f59b42dd1722fe41d1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
@@ -352,7 +348,7 @@ static tbb::runtime_loader::error_code _load( char const * dll_name, int min_ver
     tbb::runtime_loader::error_code code = tbb::runtime_loader::ec_ok;
 
     /*
-        If these variables declared at the first usage, Intel C++ Compiler may issue warning(s):
+        If these variables declared at the first usage, Intel(R) C++ Compiler may issue warning(s):
             transfer of control [goto error] bypasses initialization of: ...
         Declaring variables at the beginning of the function eliminates warnings.
     */
index 2bd1060124851077e819eea288acada993e95f68..ed47a3604eff20b8912a65566c953f78b85d5e98 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Declarations for rock-bottom simple test harness.
@@ -424,8 +420,9 @@ int main(int argc, char* argv[]) {
         res = TestMain();
 #if __TBB_MIC_OFFLOAD && __MIC__
         // It is recommended not to use the __MIC__ macro directly in the offload block but it is Ok here
-        // since it is not lead to an unexpected difference between host and target compilation phases.
-        // We need to flush internals COI buffers to order output from the offload part before the host part.
+        // since it does not lead to an unexpected difference between host and target compilation phases.
+        // We need to flush internal Intel(R) Coprocessor Offload Infrastructure (Intel(R) COI) buffers
+        // to order output from the offload part before the host part.
         // Also it is work-around for the issue with missed output.
         COIProcessProxyFlush();
 #endif
index 3e10183c0846a776d4a92258a7e975093529bf47..8937def98e3b34237a3333ed96d9dd2e586b3f6a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Declarations for simple estimate of the memory being used by a program.
@@ -650,6 +646,82 @@ public:
     void* unique_pointer;
 };
 
+#include "tbb/internal/_allocator_traits.h" // Need traits_true/false_type
+
+template <typename Allocator, typename POCMA = tbb::internal::traits_false_type,
+          typename POCCA = tbb::internal::traits_false_type, typename POCS = tbb::internal::traits_false_type>
+struct propagating_allocator : Allocator {
+    typedef POCMA propagate_on_container_move_assignment;
+    typedef POCCA propagate_on_container_copy_assignment;
+    typedef POCS propagate_on_container_swap;
+    bool* propagated_on_copy_assignment;
+    bool* propagated_on_move_assignment;
+    bool* propagated_on_swap;
+    bool* selected_on_copy_construction;
+
+    template <typename U>
+    struct rebind {
+        typedef propagating_allocator<typename tbb::internal::allocator_rebind<Allocator, U>::type,
+                                      POCMA, POCCA, POCS> other;
+    };
+
+    propagating_allocator() : propagated_on_copy_assignment(NULL),
+                              propagated_on_move_assignment(NULL),
+                              propagated_on_swap(NULL),
+                              selected_on_copy_construction(NULL) {}
+
+    propagating_allocator(bool& poca, bool& poma, bool& pos, bool& soc)
+        : propagated_on_copy_assignment(&poca),
+          propagated_on_move_assignment(&poma),
+          propagated_on_swap(&pos),
+          selected_on_copy_construction(&soc) {}
+
+    propagating_allocator(const propagating_allocator& other)
+        : Allocator(other),
+          propagated_on_copy_assignment(other.propagated_on_copy_assignment),
+          propagated_on_move_assignment(other.propagated_on_move_assignment),
+          propagated_on_swap(other.propagated_on_swap),
+          selected_on_copy_construction(other.selected_on_copy_construction) {}
+
+    template <typename Allocator2>
+    propagating_allocator(const propagating_allocator<Allocator2, POCMA, POCCA, POCS>& other)
+        : Allocator(other),
+          propagated_on_copy_assignment(other.propagated_on_copy_assignment),
+          propagated_on_move_assignment(other.propagated_on_move_assignment),
+          propagated_on_swap(other.propagated_on_swap),
+          selected_on_copy_construction(other.selected_on_copy_construction) {}
+
+    propagating_allocator& operator=(const propagating_allocator&) {
+        ASSERT(POCCA::value, "Allocator should not copy assign if pocca is false");
+        if (propagated_on_copy_assignment)
+            *propagated_on_copy_assignment = true;
+        return *this;
+    }
+
+#if __TBB_CPP11_RVALUE_REF_PRESENT
+    propagating_allocator& operator=(propagating_allocator&&) {
+        ASSERT(POCMA::value, "Allocator should not move assign if pocma is false");
+        if (propagated_on_move_assignment)
+            *propagated_on_move_assignment = true;
+        return *this;
+    }
+#endif
+
+    propagating_allocator select_on_container_copy_construction() const {
+        if (selected_on_copy_construction)
+            *selected_on_copy_construction = true;
+        return *this;
+    }
+};
+
+template <typename Allocator, typename POCMA, typename POCCA, typename POCS>
+void swap(propagating_allocator<Allocator, POCMA, POCCA, POCS>& lhs,
+          propagating_allocator<Allocator, POCMA, POCCA, POCS>&) {
+    ASSERT(POCS::value, "Allocator should not swap if pocs is false");
+    if (lhs.propagated_on_swap)
+        *lhs.propagated_on_swap = true;
+}
+
 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
     // Workaround for overzealous compiler warnings
     #pragma warning (pop)
index f59684d6c052aea83503f292fc0f56b50d49a7e4..e94accddc9aa4b76538bafb7f38aa2f6f7c38c98 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_test_harness_allocator_overload_H
index ed7bfbe968fd2764ba28d66bd12e01d1ccbd6162..22a3fb954f3906756fc28198df56d2cfbbc4c258 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Just the assertion portion of the harness.
index 9b9821928cc90074c310ba9f1b0e934b22f66bbf..46f24d13b8485da9f523ab528325ff87d13cf13f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Declarations for checking __TBB_ASSERT checks inside TBB.
index 9679fe82173844991e7b8c8c55a3a194e2588cff..643aa15ad44401d8663f06dbfa81b113b03a63e4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/atomic.h"
index 7873d24d4cbb10c1bfe53fd933bc0615f2c76b1e..89cf7d0394cefc8d7e6f57d42754d9d31c4ae935 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_tests_harness_checktype_H
index 8f221e1e7ff3eb9b24855be7fdf9643dd046abd7..07f147b15ece88733b1b56058b7d07286bfe0d4f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_tests_harness_concurrency_H
index 84386cda9de47b923696eecc0b727df379d6178e..f6d56f28e6ed986f7495ffb67900c98ae6ec3f0f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_tests_harness_concurrency_tracker_H
index 1d13a9aaca8aca0ec1d5aab543b5f9e9c12918de..092cc03e3c958c78a9e571bd688e31043b20773a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Declarations for simple estimate of CPU time being used by a program.
index 1a89c967b1e7253bb13c45dd926c30b446304198..9195c72b666371f03a3f4f0322c2dfeb4920c5cf 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_harness_defs_H
index 1fe30d8fde4e06f8875824adc9145a970a50db73..e4a1055c8f1a04591991a6ac3232525e2bf53736 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 192229de78527ebe0c2425d7e4d77a349c8a1863..e05d63f2b58d54b333b7d8bb674823d4db839c13 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include <typeinfo>
index f79cf42309c9255af809d79392cb90128eec66b8..3fa9c174ae719d255f1dde6e06471b6b36875f45 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // include system header to prevent standard library to be included under private=public first time
index cfd5cfd4b6288935e4f2e85e304e9aad60e3697b..d09754d84a05d225b86dd4a37873a1679e7668b8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /** @file harness_graph.cpp
index 4ba8d9948810dc0ffc6f846a7c9bdc6659bbedcc..804efed0573bc39aa38bdc5f345a8ffd9fe99971 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Used in tests that work with TBB scheduler but do not link to the TBB library.
index dc8bba2d54e4d51bbdbc4e67a040f881e7dbd7f9..faff695367f5da3c712bd0fab43cfa67400a3538 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef harness_iterator_H
index aadb2f6f43e99e0870dabfda76612fcdbe9955bd..3e4985b999a7995357cc329e2e63c27380d98aa8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Header that sets HAVE_m128/HAVE_m256 if vector types (__m128/__m256) are available
index c5290f01ffa4b2c541525f2b76feeff7ea4235b7..0446fa3f6bc335a30b6fd9312dd301dba57f1f72 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Declarations for simple estimate of the memory being used by a program.
index 02f0c457208683f375347b1d319824e240fd9f86..932bcc31cbe3100abec36619c1980feb503cbe44 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_test_harness_mic_H
index b3830b67eabe55e917af9e1f0956da39190ffe4d..0851b262eac5fc936e6a800ec4083e0b69d3df3a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // This file is intended for preloading (via compiler options such as -include) into every test.
index a1ca1103d135ef67d7f23d48afbf777acf8034a9..86b80f8ddbbf952d4e6cc7c01bd8f384933b0699 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Just the tracing portion of the harness.
index d1a3f14c0989830e966ec3aaa45112a2f4478634..516659be83138a77510631ae695d85f1b381be52 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef harness_runtime_loader_H
index 86f11fd1f06d2cdf980fae5cce7a17b72b915751..437c7c9df4f2f0809bcaa69ff13aeb0dcae02e69 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Declarations for a class that can track operations applied to its objects.
index bd65834dca7dca39cf3616fade54a2efd43b3915..7c5ec626daa8b0e51837376b52535a9179561039 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/task.h"
index 2b3f30db248f5ba05ebdbe81c3e4af3554f8be99..905a30d6660fbaeaa3a50574bed95f515428e7ad 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef harness_tbb_independence_H
index a3aa159fd97344741b6baba28cb3210577bd8da8..c1eef673f7165bc7d61f88587ff9d8c8966f23f0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_harness_test_cases_framework_H
index 34706b0c5d98c7e9df51b4ee46efbf1a3644c990..961242b0078971321f8ad3b99eed4eb9bdbc4845 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 class LimitTLSKeysTo {
index 194003f74038a012877b9da22238c000f261af69..ecb4e9554b82ef729ff28c2cca7e8d54e2bf66ee 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Header that includes Intel(R) Transactional Synchronization Extensions (Intel(R) TSX) specific test functions
index 91ee2e5c0a5c79260ab631c83b34988fd4f33a57..b1604af086837fd1f2cf3396a8fb89d5799647d1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test whether scalable_allocator complies with the requirements in 20.1.5 of ISO C++ Standard (1998).
@@ -203,6 +199,21 @@ int TestMain () {
         }
 
         result += TestMain(tbb::memory_pool_allocator<void>(pool) );
+    }{
+        // Two nested level allocators case with fixed pool allocator as an underlying layer
+        // serving allocRawMem requests for the top level scalable allocator
+        typedef tbb::memory_pool<tbb::memory_pool_allocator<char, tbb::fixed_pool> > NestedPool;
+
+        static char buffer[8*1024*1024];
+        tbb::fixed_pool fixedPool(buffer, sizeof(buffer));
+        // Underlying fixed pool allocator
+        tbb::memory_pool_allocator<char, tbb::fixed_pool> fixedPoolAllocator(fixedPool);
+        // Memory pool that handles fixed pool allocator
+        NestedPool nestedPool(fixedPoolAllocator);
+        // Top level memory pool allocator
+        tbb::memory_pool_allocator<char, NestedPool> nestedAllocator(nestedPool);
+
+        result += TestMain(nestedAllocator);
     }
     TestSmallFixedSizePool();
     TestZeroSpaceMemoryPool();
index cad44c869d2cf672c32ad9a4b4e46e3be4e7d742..3989e96653664b8f9ca95f51ae4e357429f0ad29 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test whether scalable_allocator works with some of the host's STL containers.
index 56900ec9d57d7b23291f2fd0811dc2b3ed4cd0a1..601ab4ff386a948d32af4c5175111b138804c9cd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef TBB_PREVIEW_AGGREGATOR
index a74494afbca6d8defc55464a4311acde5425d3f2..28d73a5ea314752923e6a5dc6fa1427c952ab7be 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 83e427e42a68b0feee491fc0cf00e1c47350dd89..96e9dad5151765f7d0b2da44c487f39594ca5fac 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Basic testing of an allocator
index 5102ec883c13a33c1e4b2ad40b70e6920f56ffc6..4ca99504e0bd426d1a7e7067dcc422317b921098 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Tests for compatibility with the host's STL.
index e21e65ec8fe1a5a2f75ce862980b9489098112c0..562f4c4e0982fd2f67c9170dd3c01f4324d806ac 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Program for basic correctness testing of assembly-language routines.
index fe1b40c18f3f6bf79f63a64ac49f86aa1ca11bfc..ae4d049640deb00a515f42447580fecb09e91016 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef TBB_PREVIEW_FLOW_GRAPH_FEATURES
index 12d8f011448e86a4f4434f0c5f0f10853d235f37..25662504aad6ccac8aec90eeed94b1ef6b36b1f6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 144a29d36264a70a8e3ec42779d8ddc90cff2a20..065df69695f6a8cad42da971fed6d276ee8aab9c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_defs.h"
index 5411fd1c574b67c0d511f67fb61a645c3231662a..245405d69681b6480b5964b1d7b5545a1fa237e1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/blocked_range.h"
index e087e155bd49941f4e074af5f471edfc0cf926a1..306eedd4a7cff58b42c6a8fcafcffce1e6cf975b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/blocked_range2d.h"
index c876126d264829108ff3b2828b279b9a202c3dcf..1609cf40da43525cdf25531f3434ee838047d96e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/blocked_range3d.h"
index 21d8dfccde425adac391804e028859b3e17fd0e6..413f5298e8e9130cf989b0ece3ac4445597025ea 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_BLOCKED_RANGE_ND 1
index 56905406ef095604f8cc146960a58c5ba12fa354..362419b2f032d3e941275c208d0e8768aebcdfc9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 932ee2621ef54dfb99aed29da8df0128768fe376..3a1825ce7591b8580ea0c17190e67d8d1f95ce71 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 87be2ea7dd2119cca27a258ce6931def1fccf5d3..b5e65beffffcb758f70c9bb261a2f9b05e90ae69 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test whether cache_aligned_allocator works with some of the host's STL containers.
index 309ccaad969c9502f38bfb7776cc9e6c3c4b7a42..eef664bafcb5f4578fb582082937d172a2165b82 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test whether cache_aligned_allocator works with some of the host's STL containers.
index 7317fe0e8ffde00451479b3f063409baae76a47a..c5b1f0790660cd66cc95d5ea9eff378374e47fcc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // This file is a common part of test_cilk_interop and test_cilk_dynamic_load tests
index 886a89eae12a41bb1367f701a54e16f2828fdabd..105436337d020eebc83f3c1923044affc7fcc8c5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 03c24d6d50eef2663a68dc47a8a761d74179771f..6dab224c30807474e77c0f1b9a3f64f373b64911 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 8de142b47333eaecf358cb2f12a4681189e43cbb..e288f6b40edcfc486cf8b94ac1c731e25a5f2040 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 0
index 8f93a099137f80e595741b97afcd77a1922ab81d..14b6b71e32928e68032bca7d84472e7eae83c8d0 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 57963036f1e4a0de0c559083fa16899c6824953e..5fb9681bfbd7ba74502696781098122b7452ca26 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef TBB_USE_PERFORMANCE_WARNINGS
@@ -1611,6 +1607,88 @@ void TestScopedAllocator() {
 }
 #endif
 
+// C++03 allocator doesn't have to be assignable or swappable, so
+// tbb::internal::allocator_traits defines POCCA and POCS as false_type
+#if __TBB_ALLOCATOR_TRAITS_PRESENT
+
+template<typename Allocator>
+void test_traits() {
+    typedef int key_type;
+
+    typedef int mapped_type;
+    typedef tbb::tbb_hash_compare<key_type> compare_type;
+
+    typedef typename Allocator::propagate_on_container_copy_assignment pocca;
+    typedef typename Allocator::propagate_on_container_swap pocs;
+
+    typedef tbb::concurrent_hash_map<key_type, mapped_type, compare_type, Allocator> container_type;
+    bool propagated_on_copy_assign = false;
+    bool propagated_on_move = false;
+    bool propagated_on_swap = false;
+    bool selected_on_copy_construct = false;
+
+    Allocator alloc(propagated_on_copy_assign, propagated_on_move, propagated_on_swap, selected_on_copy_construct);
+
+    container_type c1(alloc), c2(c1);
+    ASSERT(selected_on_copy_construct, "select_on_container_copy_construction function was not called");
+
+    c1 = c2;
+    ASSERT(propagated_on_copy_assign == pocca::value, "Unexpected allocator propagation on copy assignment");
+
+#if __TBB_CPP11_RVALUE_REF_PRESENT
+    typedef typename Allocator::propagate_on_container_move_assignment pocma;
+    c2 = std::move(c1);
+    ASSERT(propagated_on_move == pocma::value, "Unexpected allocator propagation on move assignment");
+#endif
+
+    c1.swap(c2);
+    ASSERT(propagated_on_swap == pocs::value, "Unexpected allocator propagation on swap");
+}
+
+#if __TBB_CPP11_RVALUE_REF_PRESENT
+class non_movable_object {
+    non_movable_object() {}
+private:
+    non_movable_object(non_movable_object&&);
+    non_movable_object& operator=(non_movable_object&&);
+};
+
+void test_non_movable_value_type() {
+    // Check, that if pocma is true, concurrent_hash_map allows move assignment without per-element move
+    typedef propagating_allocator<tbb::tbb_allocator<int>, /*POCMA=*/tbb::internal::traits_true_type> allocator_type;
+    typedef tbb::concurrent_hash_map<int, non_movable_object, tbb::tbb_hash_compare<int>, allocator_type> container_type;
+    allocator_type alloc;
+    container_type container1(alloc), container2(alloc);
+    container1 = std::move(container2);
+}
+
+#endif // __TBB_CPP11_RVALUE_REF_PRESENT
+
+void TestAllocatorTraits() {
+    typedef tbb::tbb_allocator<int> base_allocator;
+    typedef tbb::internal::traits_true_type true_type;
+    typedef tbb::internal::traits_true_type false_type;
+
+    typedef propagating_allocator<base_allocator, /*POCMA=*/true_type, /*POCCA=*/true_type, /*POCS=*/true_type>
+            always_propagating_allocator;
+    typedef propagating_allocator<base_allocator, false_type, false_type, false_type> never_propagating_allocator;
+    typedef propagating_allocator<base_allocator, true_type, false_type, false_type> pocma_allocator;
+    typedef propagating_allocator<base_allocator, false_type, true_type, false_type> pocca_allocator;
+    typedef propagating_allocator<base_allocator, false_type, false_type, true_type> pocs_allocator;
+
+    test_traits<always_propagating_allocator>();
+    test_traits<never_propagating_allocator>();
+    test_traits<pocca_allocator>();
+    test_traits<pocma_allocator>();
+    test_traits<pocs_allocator>();
+
+#if __TBB_CPP11_RVALUE_REF_PRESENT
+    test_non_movable_value_type();
+#endif
+}
+
+#endif // __TBB_ALLOCATOR_TRAITS_PRESENT
+
 //------------------------------------------------------------------------
 // Test driver
 //------------------------------------------------------------------------
@@ -1678,5 +1756,9 @@ int TestMain () {
     TestScopedAllocator();
 #endif
 
+#if __TBB_ALLOCATOR_TRAITS_PRESENT
+    TestAllocatorTraits();
+#endif
+
     return Harness::Done;
 }
index 13826add232f23c4012e529b2c651b34546baf38..da10a98d0f103b638b4e897517b5466ed044c855 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER
index f49fef3bd5ad6bab1f14b778a5cd2f19e8a69eff..10c9fbc6791b5e6be79a78f1a5685855e2adb150 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 6
index 88c501aa6f4e5c7328b33961fdb646cff7109201..6a20194d6817b318eb20d2062d0efbab43fbe80f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_defs.h"
index 4d3333b921d913be8547c3b1a42366169f24b58c..47478dddbcf411ce84938e69310714dd0d17b5f8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define NOMINMAX
index e05de6131c4e1bd2df48fb550716d1ff96c7a02b..7460c59f193909df02fa7fdf17c29eecf91c0cfc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFINE_PRIVATE_PUBLIC 1
index e34938aefe528a73d946bb2652670cd7f252b2a9..75a6f15781dd1fc2e1f8fcbe4ab0eba549475e86 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Some tests in this source file are based on PPL tests provided by Microsoft. */
index 8864df60d9b5fa8f24f8a241be22fb4e6fe3f09c..01ff1ba6a9095cacdabfba168df031e956be6c83 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define __TBB_EXTRA_DEBUG 1
index 3bc277e444ed8040d76c05b1a32548420ec8fad0..d9ccee70af74c996ca7ece33ba1982e8b66cd4f9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER
index 56034fcd94296d4da7b636ba47df450fd5f5b1d6..9b0c4a9335c3389d6bfc4598588902c666457a76 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER
index f36b237274f6bd78dee36743f7ac1a751d42bbea..e8c2c96c4fd93907a5d1fb05ab126472f9af6b0e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/compat/condition_variable"
index 78061393d072081a3f4815eab4796d51adab2f7a..271de81ece8a337ef94cb5b7c6ee13ac4e2678cb 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_test_container_move_support_H
index a37f1b11b079a9f9eaf4212cb44fa63672417a12..b7dd2955b51dcf2dbfc89cd87e65243409c7ed21 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index 0605ad9e28712e452a537edc0cc6c8a4bed860dc..8b74574bf7c33873ff0aab442bb1e2ea6de4c02d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // test critical section
index b4740ce7a80eb7db9ed1963841c2e014797326bb..d25b6f23720edd3b42d3aa99674e8b15ba18ba74 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 enum FOO_TYPE {
index e921d303f8ce7cfa7f85d1e2695121988f9e141c..7287c3c3c88ff9aeb037f7ac27591125cd97c781 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 2
index 9fe4a8726355bba6b5c33baa42a3985268f55437..70f087305883838d5990b734c60693757281e2c5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 2
index b85cc600e5daa33514f97246cbbeab749947d3f5..55fe5a9fbd3c34029eed23949fb972ce19691913 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 2
index 8697686e8454201f6d953b8a4cd6dce47b9f10bb..6d0ab72364ba31eadc88824f5804e0ae8a3ba1ab 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 0
index cd4a66cefa230c7ad283914b60f5c05ea77e5152..3425092b9bf623c112e67269adb20d6f16652b34 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (c) 2005-2019 Intel Corporation
+    Copyright (c) 2018-2019 Intel Corporation
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
 #include "../tbb/tbb_environment.h"
 
-#include <time.h>
 #include <string>
 #include <algorithm>
+#include <sstream>
+#include <climits>
+#include <utility>
+#include <vector>
+
+const char * environment_variable_name = "TEST_VARIABLE_NAME";
 
 // For WIN8UI applications reading and writing the environment variables
 // is prohibited due to the platform limitations
 #if !__TBB_WIN8UI_SUPPORT
 
-void set_and_get_tbb_version(const char* value, bool expected_result){
-    // TODO: consider to replace TBB_VERSION with test specific or arbitrary variable
-    const char* name = "TBB_VERSION";
-    Harness::SetEnv(name, value);
-    bool result = tbb::internal::GetBoolEnvironmentVariable(name);
-    ASSERT(result == expected_result, "Wrong GetBoolEnvironmentVariable return value");
-    Harness::SetEnv(name, "");
+#if _WIN32 || _WIN64
+    // Environment variable length is limited by 32K on Windows systems
+    const size_t large_length = 32000;
+#else
+    const size_t large_length = 1000000;
+#endif
+
+template<typename T>
+void set_and_get_test_variable( T (*environment_variable_getter )(const char *),
+                                std::pair<std::string, T> test_case ) {
+    Harness::SetEnv(environment_variable_name, test_case.first.c_str());
+    T result = environment_variable_getter(environment_variable_name);
+    ASSERT(result == test_case.second, "Wrong Get<Type>EnvironmentVariable return value");
+    Harness::SetEnv(environment_variable_name, "");
 }
 
 Harness::FastRandom rnd(12345);
@@ -46,82 +54,188 @@ struct random_character_generator {
     }
 };
 
-void test_random_environment_variable(size_t length) {
-    ASSERT(length != 0, "Requested random string cannot be empty");
-    std::string rand_string(length, ' ');
-    std::generate(rand_string.begin(), rand_string.end(), random_character_generator());
-    bool expected_result = false;
-    for (unsigned i = 0; rand_string[i]; i++)
-        if (rand_string[i] == '1') {
+bool alternative_env_variable_checker(const char * str, bool) {
+    bool result = false;
+    for (unsigned i = 0; str[i]; i++) {
+        if (str[i] == '1') {
             // if we found more the one '1' character -> return false
-            expected_result = !expected_result;
-            if (!expected_result) break;
+            result = !result;
+            if (!result) return false;
         }
-        else if (rand_string[i] != ' ') {
+        else if (str[i] != ' ') {
             // if we found some character other than ' ' and '1'  -> return false
-            expected_result = false;
-            break;
+            return false;
         }
+    }
+    return result;
+}
+
+// Suitable alternative checker for GetLongEnvVariable() was not found
+// So we use here code from GetLongEnvVariable() realization
+long alternative_env_variable_checker(const char * str, long) {
+    char* end;
+    errno=0;
+    long result = std::strtol(str, &end, 10);
 
-    set_and_get_tbb_version(rand_string.c_str(), expected_result);
+    // We have exceeded the range, value is negative or string is incovertable
+    if (errno == ERANGE || result < 0 || end==str) {
+        result = -1;
+    }
+
+    for (; *end != '\0'; end++) {
+        if (!std::isspace(*end))
+            result = -1;
+    }
+    return result;
 }
 
-void test_get_bool_environment_variable() {
-    // Test undefined variable
-    ASSERT(!tbb::internal::GetBoolEnvironmentVariable("TBB_VERSION"),
-           "TBB_VERSION should not be defined in the beginning of the test");
-
-    set_and_get_tbb_version("", false);
-    set_and_get_tbb_version(" ", false);
-    set_and_get_tbb_version("1", true);
-    set_and_get_tbb_version(" 1 ", true);
-    set_and_get_tbb_version("1               ", true);
-    set_and_get_tbb_version("            1               ", true);
-    set_and_get_tbb_version("            1", true);
-    set_and_get_tbb_version(" 11", false);
-    set_and_get_tbb_version("111111", false);
-    set_and_get_tbb_version("1 1", false);
-    set_and_get_tbb_version(" 1 abc?", false);
-    set_and_get_tbb_version("1;", false);
-    set_and_get_tbb_version(" d ", false);
-    set_and_get_tbb_version("0", false);
-    set_and_get_tbb_version("0 ", false);
-    set_and_get_tbb_version("000000", false);
-    set_and_get_tbb_version("01", false);
-    set_and_get_tbb_version("00000001", false);
-    set_and_get_tbb_version("ABCDEFG", false);
-    set_and_get_tbb_version("2018", false);
-    set_and_get_tbb_version("ABC_123", false);
-    set_and_get_tbb_version("true", false);
+template <typename T>
+std::pair<std::string, T> create_random_case(size_t length){
+    ASSERT(length != 0, "Requested random string cannot be empty");
+    std::string rand_string(length, ' ');
+    std::generate(rand_string.begin(), rand_string.end(), random_character_generator());
+
+    T expected_result = alternative_env_variable_checker(rand_string.c_str(), T());
+
+    return std::make_pair(rand_string, expected_result);
+}
 
+template <typename T>
+void prepare_random_cases(std::vector<std::pair<std::string, T> >& cases){
+    // Random cases
     size_t length = 10000;
 
     for(size_t i =0; i < 10; ++i) {
-        test_random_environment_variable((rnd.get() % length) + 1);
+        cases.push_back(create_random_case<T>((rnd.get() % length) + 1 ));
     }
 
-#if _WIN32 || _WIN64
-    // Environment variable length is limited by 32K on Windows systems
-    size_t large_length = 32000;
-#else
-    size_t large_length = 1000000;
-#endif
-    set_and_get_tbb_version(std::string(large_length, 'A').c_str(), false);
-    set_and_get_tbb_version((std::string(large_length, ' ')+'1').c_str(), true);
-    test_random_environment_variable(large_length);
+    // Random case with large string
+    cases.push_back(create_random_case<T>(large_length));
 }
 
+std::vector<std::pair<std::string, bool> > initialize_cases( bool wrong_result ){
+    std::vector<std::pair<std::string, bool> > cases;
+    // Valid cases
+    cases.push_back(std::make_pair("1", true));
+    cases.push_back(std::make_pair(" 1 ", true));
+    cases.push_back(std::make_pair("1               ", true));
+    cases.push_back(std::make_pair("            1               ", true));
+    cases.push_back(std::make_pair("            1", true));
+    cases.push_back(std::make_pair((std::string(large_length, ' ')+'1').c_str(), true));
+
+    // Invalid cases
+
+    cases.push_back(std::make_pair("", wrong_result));
+    cases.push_back(std::make_pair(" ", wrong_result));
+    cases.push_back(std::make_pair(" 11", wrong_result));
+    cases.push_back(std::make_pair("111111", wrong_result));
+    cases.push_back(std::make_pair("1 1", wrong_result));
+    cases.push_back(std::make_pair(" 1 abc?", wrong_result));
+    cases.push_back(std::make_pair("1;", wrong_result));
+    cases.push_back(std::make_pair(" d ", wrong_result));
+    cases.push_back(std::make_pair("0", wrong_result));
+    cases.push_back(std::make_pair("0 ", wrong_result));
+    cases.push_back(std::make_pair("000000", wrong_result));
+    cases.push_back(std::make_pair("01", wrong_result));
+    cases.push_back(std::make_pair("00000001", wrong_result));
+    cases.push_back(std::make_pair("ABCDEFG", wrong_result));
+    cases.push_back(std::make_pair("2018", wrong_result));
+    cases.push_back(std::make_pair("ABC_123", wrong_result));
+    cases.push_back(std::make_pair("true", wrong_result));
+    cases.push_back(std::make_pair(std::string(large_length, 'A').c_str(), wrong_result));
+
+    prepare_random_cases(cases);
+
+    return cases;
+}
+
+std::vector<std::pair<std::string, long> > initialize_cases( long wrong_result ){
+    std::vector<std::pair<std::string, long> > cases;
+    std::stringstream ss;
+    // Valid cases
+    for (long i = 0; i < 100; i++) {
+        ss << i;
+        cases.push_back(std::make_pair(ss.str().c_str(), i));
+        ss.str("");
+
+        ss << "     " << i << "      ";
+        cases.push_back(std::make_pair(ss.str().c_str(), i));
+        ss.str("");
+
+        ss << i << "     ";
+        cases.push_back(std::make_pair(ss.str().c_str(),i));
+        ss.str("");
+
+        ss << "     " << i;
+        cases.push_back(std::make_pair(ss.str().c_str(),i));
+        ss.str("");
+    }
+
+    ss << LONG_MAX;
+    cases.push_back(std::make_pair(ss.str().c_str(),LONG_MAX));
+    ss.str("");
+
+    cases.push_back(std::make_pair((std::string(large_length, ' ')+'1').c_str(), 1L));
+
+    // Invalid cases
+    cases.push_back(std::make_pair("", wrong_result));
+    cases.push_back(std::make_pair("  ", wrong_result));
+    cases.push_back(std::make_pair("a", wrong_result));
+    cases.push_back(std::make_pair("^&*", wrong_result));
+    cases.push_back(std::make_pair("  10   e", wrong_result));
+    cases.push_back(std::make_pair("a   12", wrong_result));
+    cases.push_back(std::make_pair("eeeeeeeeeeeeeeeeeeeeeeeeee", wrong_result));
+    cases.push_back(std::make_pair("200000000000000000000000000", wrong_result));
+    cases.push_back(std::make_pair("-1", wrong_result));
+    cases.push_back(std::make_pair("-100", wrong_result));
+    cases.push_back(std::make_pair("-20000000000000000000000000", wrong_result));
+    cases.push_back(std::make_pair("ABBDDRR", wrong_result));
+    cases.push_back(std::make_pair("10  10", wrong_result));
+    cases.push_back(std::make_pair("true", wrong_result));
+    cases.push_back(std::make_pair("false", wrong_result));
+    cases.push_back(std::make_pair("1A", wrong_result));
+    cases.push_back(std::make_pair("_123", wrong_result));
+    cases.push_back(std::make_pair(std::string(large_length, 'A').c_str(), wrong_result));
+
+    // Prepare string with LONG_MAX + 1 value
+    ss << LONG_MAX / 10 << (LONG_MAX % 10 + 1);
+    cases.push_back(std::make_pair(ss.str().c_str(),-1));
+    ss.str("");
+
+    prepare_random_cases(cases);
+    return cases;
+}
+
+template <typename T>
+void test_environment_variable( T (*environment_variables_handler )(const char *), T wrong_result ) {
+    ASSERT(environment_variables_handler (environment_variable_name) == wrong_result,
+           "Tested environment variable should not be defined in the beginning of the test");
+
+    // Every pair is a test case:
+    // pair.first -> value of environment variable
+    // pair.second -> expected result
+    std::vector< std::pair<std::string, T> > cases = initialize_cases(wrong_result);
+
+    for (size_t i = 0; i != cases.size(); i++) {
+        set_and_get_test_variable(environment_variables_handler, cases[i]);
+    }
+}
+
+
 #else // __TBB_WIN8UI_SUPPORT
 
-void test_get_bool_environment_variable() {
+template <typename T>
+void test_environment_variable(T (*environment_variables_handler )(const char *), T wrong_result) {
     for(size_t i = 0; i < 100; ++i) {
-        ASSERT(!tbb::internal::GetBoolEnvironmentVariable("TBB_VERSION"),
-               "GetBoolEnvironmentVariable should always return false for UWP applications");
+        ASSERT(environment_variables_handler(environment_variable_name) == wrong_result,
+               "Get<Type>EnvironmentVariable should always return false for UWP applications");
     }
 }
+
 #endif // __TBB_WIN8UI_SUPPORT
 
 int TestMain() {
-    test_get_bool_environment_variable();
+    test_environment_variable(tbb::internal::GetBoolEnvironmentVariable, false);
+    test_environment_variable(tbb::internal::GetIntegralEnvironmentVariable, -1L);
     return Harness::Done;
 }
index cb0d79342bcc3a018debcf93fe0b2f73977a5c9b..8d7ef177caa8ed69afd08bc75d03976e4b912210 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_TEST_USE_WSUGGEST_OVERRIDE
index a9504580f95cbfd6be8c2128edc7d782edf3cc4a..f0efcf782a59f15adc38fd9ad4461dafc65072c2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /**
index e45cc3cb9154173cdca964ba2385e7fa3f24b85a..3c1915ea1b8747fc7b2358cb7111683bff83c804 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_graph.h"
index 3f8dd2649dcc0466223af7dbc8a31ce49e28032c..08c7857c0529fe8c0ed8521437b171da943f31ee 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_defs.h"
index 91b90ca788f70ca238adc029d5dcac67c00d2365..a4971fb38192e90d06fce13ce4bb68ce6ae1bd42 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 3
index 74c6e4ff943700163a0be78ede9c77860ed24abe..e7c8cfc22885f76b54bec53a6102da8db83f0d83 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /** This test checks the automatic propagation of master thread FPU settings
index 545312a00994f2b44fef9575d6569d40fd0b3718..5aad9b2c6e0a67749005baeb198657dcdbdde78e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
diff --git a/src/test/test_gfx_factory.cpp b/src/test/test_gfx_factory.cpp
deleted file mode 100644 (file)
index 9ab6fd1..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
-    Copyright (c) 2005-2019 Intel Corporation
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-
-
-
-*/
-
-#define TBB_PREVIEW_FLOW_GRAPH_NODES 1
-#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1
-
-#include "tbb/tbb_config.h"
-
-#if __TBB_PREVIEW_GFX_FACTORY && __TBB_PREVIEW_STREAMING_NODE
-
-#if _MSC_VER
-#pragma warning (disable: 4503) // Suppress "decorated name length exceeded, name was truncated" warning
-#endif
-
-#include "tbb/flow_graph.h"
-#include "tbb/gfx_factory.h"
-
-#include <cilk/cilk.h>
-
-#include "harness.h"
-#include "harness_assert.h"
-
-using namespace tbb::flow;
-
-//---------------------------------------------------------------------------------------------------------------------------------
-// Helpers
-//---------------------------------------------------------------------------------------------------------------------------------
-
-typedef tuple< gfx_buffer<int>, size_t > kernel_args;
-typedef streaming_node< kernel_args, queueing, gfx_factory > gfx_node;
-
-template <typename T>
-void init_random_buffer(gfx_buffer<T>& buf) {
-    Harness::FastRandom rnd(42);
-    std::generate(buf.begin(), buf.end(), [&rnd]() { return rnd.get(); });
-}
-
-template <typename T>
-void copy_buffer_to_vector(gfx_buffer<T>& buf, std::vector<T>& vect) {
-    std::copy(buf.begin(), buf.end(), std::back_inserter(vect));
-}
-
-//---------------------------------------------------------------------------------------------------------------------------------
-
-// GFX functions to offload
-static __declspec(target(gfx_kernel))
-void sq_vec(int *v, size_t n) {
-    cilk_for(size_t i = 0; i < n; ++i) {
-        v[i] = v[i] * v[i];
-    }
-}
-
-// Reference function
-void sq_vec_ref(std::vector<int>& v) {
-    for (size_t i = 0; i < v.size(); ++i) {
-        v[i] = v[i] * v[i];
-    }
-}
-
-//---------------------------------------------------------------------------------------------------------------------------------
-
-void TestDynamicKernelArgs_finalize() {
-    REMARK("    TestDynamicKernelArgs_finalize: ");
-
-    // Initialize input data
-    const size_t array_size = 1000;
-    gfx_buffer<int> buffer(array_size);
-
-    // Generate random buffer values
-    init_random_buffer(buffer);
-
-    // Copy buffer to vector for the next validation
-    std::vector<int> check_vec;
-    copy_buffer_to_vector(buffer, check_vec);
-
-    // Obtain reference result
-    sq_vec_ref(check_vec);
-
-    graph g;
-    gfx_factory factory(g);
-
-    gfx_node streaming_n(g, sq_vec, gfx_factory::dummy_device_selector(), factory);
-
-    streaming_n.set_args(port_ref<0, 1>);
-    input_port<0>(streaming_n).try_put(buffer);
-    input_port<1>(streaming_n).try_put(array_size);
-
-    g.wait_for_all();
-
-    ASSERT((buffer.size() == check_vec.size()), "Validation has failed");
-    ASSERT((std::equal(buffer.begin(), buffer.end(), check_vec.begin())), "Validation has failed");
-    REMARK("done\n");
-}
-
-void TestConstantKernelArgs_finalize() {
-    REMARK("    TestConstantKernelArgs_finalize: ");
-
-    // Initialize input data
-    const size_t array_size = 1000;
-    gfx_buffer<int> buffer(array_size);
-
-    // Generate random buffer values
-    init_random_buffer(buffer);
-
-    // Copy buffer to vector for the next validation
-    std::vector<int> check_vec;
-    copy_buffer_to_vector(buffer, check_vec);
-
-    // Obtain reference result
-    sq_vec_ref(check_vec);
-
-    graph g;
-    gfx_factory factory(g);
-
-    streaming_node< tuple< gfx_buffer<int> >, queueing, gfx_factory > streaming_n(g, sq_vec, gfx_factory::dummy_device_selector(), factory);
-
-    streaming_n.set_args(port_ref<0>(), array_size);
-    input_port<0>(streaming_n).try_put(buffer);
-
-    g.wait_for_all();
-
-    ASSERT((buffer.size() == check_vec.size()), "Validation has failed");
-    ASSERT((std::equal(buffer.begin(), buffer.end(), check_vec.begin())), "Validation has failed");
-
-    REMARK("done\n");
-}
-
-void TestGfxStreamingFactory_finalize() {
-    REMARK("TestGfxStreamingFactory_finalize: ");
-    TestDynamicKernelArgs_finalize();
-    TestConstantKernelArgs_finalize();
-    REMARK("done\n");
-}
-
-//---------------------------------------------------------------------------------------------------------------------------------
-
-void TestDynamicKernelArgs_send_kernel() {
-    REMARK("    TestDynamicKernelArgs_send_kernel: ");
-
-    // Initialize input data
-    const size_t array_size = 1000;
-    gfx_buffer<int> buffer(array_size);
-
-    // Generate random buffer values
-    init_random_buffer(buffer);
-
-    // Copy buffer to vector for the next validation
-    std::vector<int> check_vec;
-    copy_buffer_to_vector(buffer, check_vec);
-
-    // Obtain reference result
-    sq_vec_ref(check_vec);
-
-    graph g;
-    gfx_factory factory(g);
-
-    gfx_node streaming_n(g, sq_vec, gfx_factory::dummy_device_selector(), factory);
-
-    join_node< kernel_args > join_n(g);
-    function_node< kernel_args > function_n(g, unlimited, [&check_vec](const kernel_args& result) {
-        gfx_buffer<int> buffer = get<0>(result);
-
-        ASSERT((buffer.size() == check_vec.size()), "Validation has failed");
-        ASSERT((std::equal(buffer.begin(), buffer.end(), check_vec.begin())), "Validation has failed");
-    });
-
-    make_edge(output_port<0>(streaming_n), input_port<0>(join_n));
-    make_edge(output_port<1>(streaming_n), input_port<1>(join_n));
-    make_edge(join_n, function_n);
-
-    streaming_n.set_args(port_ref<0, 1>);
-    input_port<0>(streaming_n).try_put(buffer);
-    input_port<1>(streaming_n).try_put(array_size);
-
-    g.wait_for_all();
-
-    REMARK("done\n");
-}
-
-void TestConstantKernelArgs_send_kernel() {
-    REMARK("    TestConstantKernelArgs_send_kernel: ");
-
-    // Initialize input data
-    const size_t array_size = 1000;
-    gfx_buffer<int> buffer(array_size);
-
-    // Generate random buffer values
-    init_random_buffer(buffer);
-
-    // Copy buffer to vector for the next validation
-    std::vector<int> check_vec;
-    copy_buffer_to_vector(buffer, check_vec);
-
-    // Obtain reference result
-    sq_vec_ref(check_vec);
-
-    graph g;
-    gfx_factory factory(g);
-
-    streaming_node< tuple< gfx_buffer<int> >, queueing, gfx_factory > streaming_n(g, sq_vec, gfx_factory::dummy_device_selector(), factory);
-
-    join_node< tuple< gfx_buffer<int> > > join_n(g);
-    function_node< tuple< gfx_buffer<int> > > function_n(g, unlimited, [&check_vec](const tuple< gfx_buffer<int> >& result) {
-        gfx_buffer<int> buffer = get<0>(result);
-
-        ASSERT((buffer.size() == check_vec.size()), "Validation has failed");
-        ASSERT((std::equal(buffer.begin(), buffer.end(), check_vec.begin())), "Validation has failed");
-    });
-
-    make_edge(output_port<0>(streaming_n), input_port<0>(join_n));
-    make_edge(join_n, function_n);
-
-    streaming_n.set_args(port_ref<0>(), array_size);
-    input_port<0>(streaming_n).try_put(buffer);
-
-    g.wait_for_all();
-
-    REMARK("done\n");
-}
-
-void TestGfxStreamingFactory_send_kernel() {
-    REMARK("TestGfxStreamingFactory_send_kernel:\n");
-    TestDynamicKernelArgs_send_kernel();
-    TestConstantKernelArgs_send_kernel();
-    REMARK("done\n");
-}
-
-//---------------------------------------------------------------------------------------------------------------------------------
-
-void ConcurrencyTest() {
-    REMARK("ConcurrencyTest: ");
-
-    // Initialize input data
-    const size_t array_size = 1000;
-    gfx_buffer<int> buffer(array_size);
-
-    // Generate random buffer values
-    init_random_buffer(buffer);
-
-    // Copy buffer to vector for the next validation
-    std::vector<int> check_vec;
-    copy_buffer_to_vector(buffer, check_vec);
-
-    // Obtain reference result
-    sq_vec_ref(check_vec);
-
-    graph g;
-    gfx_factory factory(g);
-
-    streaming_node< tuple< gfx_buffer<int> >, queueing, gfx_factory > streaming_n(g, sq_vec, gfx_factory::dummy_device_selector(), factory);
-
-    join_node< tuple< gfx_buffer<int> > > join_n(g);
-    function_node< tuple< gfx_buffer<int> > > function_n(g, unlimited, [&check_vec](const tuple< gfx_buffer<int> >& result) {
-        gfx_buffer<int> buffer = get<0>(result);
-
-        ASSERT((buffer.size() == check_vec.size()), "Validation has failed");
-        ASSERT((std::equal(buffer.begin(), buffer.end(), check_vec.begin())), "Validation has failed");
-    });
-
-    make_edge(output_port<0>(streaming_n), input_port<0>(join_n));
-    make_edge(join_n, function_n);
-
-    streaming_n.set_args(port_ref<0>(), array_size);
-
-    for (int i = 0; i < 100; i++) {
-        gfx_buffer<int> input(array_size);
-
-        for (int i = 0; i < buffer.size(); i++) {
-            input[i] = buffer[i];
-        }
-
-        input_port<0>(streaming_n).try_put(input);
-    }
-
-    g.wait_for_all();
-
-    REMARK("done\n");
-}
-
-//---------------------------------------------------------------------------------------------------------------------------------
-
-int TestMain() {
-    TestGfxStreamingFactory_finalize();
-    TestGfxStreamingFactory_send_kernel();
-    ConcurrencyTest();
-    return Harness::Done;
-}
-
-#else
-#define HARNESS_SKIP_TEST 1
-#include "harness.h"
-#endif
index 08f849bc819a4cb6cfb1717a0bcd69aebf4d44c7..8c8c2817316b273046faa9f5fe0ec6d8c06fc45b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_WAITING_FOR_WORKERS 1
index 201068424f3cdfca401e07401eada5cc15d10226..2b0895426182e48181d3b52072e8272206311505 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFINE_PRIVATE_PUBLIC 1
index 292e606590c6a6cf789322fae63ac069bd5bceaf..98c710f429a8aff22decf69d1eccada256d1ee24 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 4
index 67d3257685bfeda89cff98136f7ccef54aab7380..d5484bf3bb1b4bdbfc2414071f6cf6a510992ed5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Program for basic correctness of handle_perror, which is internal
index 10f7bf09be5b3fcecbb073c75bd07672efc5d1cf..b536c3a2309bd250c4c028fd2b2e5f85740e07da 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_defs.h"
index a836a9f79115e9edeffae46d3ff0b359764c1bda..2a02a4bf0427f1eccd23c619c496e7c29d622bd5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index a3db2c3b4a6cc9b12045891e1882ac7896b650ba..c4c9844146d06771b2c0afa4096e89e35c9c810d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_test_initializer_list_H
index 7d73cfaea67b7119762e2066a14b07ec938c90bd..903608d5bc4187f1bb7a399d1d15b6adf28e640f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __APPLE__
index 42a6356673885f08da9ba73f9b4859e43d30de4d..c60bb8079f71a58d1e976179c619a81b7645c143 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
index 34e35ed2709ab772b4fa88b275c8076e35f3d768..28c91b933c47a0deb3986a09e84ed56e5f213e7d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index 35091708a1ba42082a8b7d939e0b99d22e16722b..b2588b1cd5675e01bafc462fe69a5bbf28195b80 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 2
index 519fa149bfaa03b5964476ff9e570bd3416c2d78..8857107594fea5de51522aa7b65492a1cdf587e2 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index 11c04581a768728d004ec3ea9256473dd97cd58c..2c7d1ac76de576758d519dbfd6cadd55898aee17 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef tbb_test_join_node_H
index edf24eecebc6887ab83520b9c8c7b157d61c46be..758b904d172c81036254ac1ce579878457570d31 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index 3631f573a38e11846823ff6b37d75c865278fa9b..25ed3597d00b118e0628e40798215893f5b6adcd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Message based key matching is a preview feature
index 26d66061eb87ccd6fc831509a092135eff2d10ef..826e2464afe9587ae9a8df0cddcfe74c54376d2f 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define NOMINMAX
index 633ae8218df3ebe927504d3f9db23ab42f402f2f..ea57146c091527a3b10a2d81a18d30520976a135 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index f569e1c6c8a0a893eb0502dd965497a55771e7a0..c3fbd5d5a78ff0d7f10c3341d9fe6391f321e56c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Regression test against a bug in TBB allocator manifested when
index efc23c85b216928b06d6e22073f8a970d4ea4514..fc1918b1f8ee0f0ae9b0d22ba9edc543aed15e4d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 bool __tbb_test_errno = false;
index bacdd5969531d81241b812b67f6f2510eed224ee..1ab4fcb52a718f6fa4f4c310b1d1120045fa88e4 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/scalable_allocator.h"
@@ -162,8 +158,12 @@ struct TestThread: NoAssign {
 
 // test releasing memory from pthread key destructor
 void TestKeyDtor() {
+    // Allocate region for large objects to prevent whole region release
+    // on scalable_free(currLarge) call, which result in wrong assert inside intersectingObjects check
+    void* preventLargeRelease = scalable_malloc(32*1024);
     for (int i=0; i<4; i++)
         NativeParallelFor( 1, TestThread(1) );
+    scalable_free(preventLargeRelease);
 }
 
 #endif // _WIN32||_WIN64
index fd16665b70898c5e826574210a019ff543be0b99..68377971f8f480d38cf4f84d34bdf7d4d9351624 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _USRDLL
index 477865f2758465277f9c67579a9dda9f6ca700b2..258cb1c00abc70f1c7f522778fcfa7a81add5bf3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_allocator_overload.h"
index b12cc499b04dc519d1336725a710c81b1af1d5df..1121a38fb1d7db2747ff12582e04d75613ce790b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
index bcd79b49a950cd3effd90e1e9ed489d93db698ef..b33abbaaa6e5a3541f4ed8cf37014e38dcec4675 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_allocator_overload.h"
index 8142d26f8e54e632b400ba6d9e8c9a64464b890e..e11421494d86584c8a1881438ba25839820ee0c6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/scalable_allocator.h"
@@ -249,14 +245,12 @@ public:
             void *ptrLarge = pool_malloc(pool[id], lrgSz);
             ASSERT(ptrLarge, NULL);
             memset(ptrLarge, 1, lrgSz);
-
             // consume all small objects
-            while (pool_malloc(pool[id], 5*1024))
-                ;
-            // releasing of large object can give a chance to allocate more
+            while (pool_malloc(pool[id], 5 * 1024));
+            // releasing of large object will not give a chance to allocate more
+            // since only fixed pool can look at other bins aligned/notAligned
             pool_free(pool[id], ptrLarge);
-
-            ASSERT(pool_malloc(pool[id], 5*1024), NULL);
+            ASSERT(!pool_malloc(pool[id], 5*1024), NULL);
         }
 
         barrier.wait();
@@ -641,8 +635,8 @@ rml::MemoryPool *CreateUsablePool(size_t size)
         return NULL;
     }
     ASSERT(o, "Created pool must be useful.");
-    ASSERT(getMemSuccessful == 1 || getMemAll > getMemSuccessful,
-           "Multiple requests are allowed only when unsuccessful request occurred.");
+    ASSERT(getMemSuccessful == 1 || getMemSuccessful == 5 || getMemAll > getMemSuccessful,
+           "Multiple requests are allowed when unsuccessful request occurred or cannot search in bootstrap memory. ");
     ASSERT(!putMemAll, NULL);
     pool_free(pool, o);
 
index ab4b3c2ab470e9b959de5dbaa4be500414cc158b..13bac32709394512449ce29a0601055c18ed6a0b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifdef __cplusplus
index f06d9da8df5b2b1a554cfd8610b0bfae0199f7c9..0f274999a846c006e41ad76445daef358b784a70 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
index 2234afb607efbe5af51b05eec176ce3c132072ad..798bbba76a5e88a5c7a38a380e8dec43021ea982 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_CUSTOM_MAIN 1
index 7c0f51c7f822a140a1b2e953166ecfd903b9540d..a6a0725f064aa78244c53885b0edea43ac6121f5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _USRDLL
index 153f3534ea895e30d35b4d8f9161a9cae2932309..b505e6a0c8090235be91f726b6fa0dc8c802edcc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* to prevent loading dynamic TBBmalloc at startup, that is not needed
@@ -620,9 +616,14 @@ public:
         for (int i=0; i<ITERS; i++) {
             BlockI *slabBlock = backend->getSlabBlock(1);
             ASSERT(slabBlock, "Memory was not allocated");
-            LargeMemoryBlock *lmb = backend->getLargeBlock(8*1024);
+            uintptr_t prevBlock = (uintptr_t)slabBlock;
             backend->putSlabBlock(slabBlock);
-            backend->putLargeBlock(lmb);
+
+            LargeMemoryBlock *largeBlock = backend->getLargeBlock(16*1024);
+            ASSERT(largeBlock, "Memory was not allocated");
+            ASSERT((uintptr_t)largeBlock != prevBlock,
+                    "Large block cannot be reused from slab memory, only in fixed_pool case.");
+            backend->putLargeBlock(largeBlock);
         }
     }
 };
@@ -632,8 +633,7 @@ void TestBackend()
     rml::MemPoolPolicy pol(getMallocMem, putMallocMem);
     rml::MemoryPool *mPool;
     pool_create_v1(0, &pol, &mPool);
-    rml::internal::ExtMemoryPool *ePool =
-        &((rml::internal::MemoryPool*)mPool)->extMemPool;
+    rml::internal::ExtMemoryPool *ePool = &((rml::internal::MemoryPool*)mPool)->extMemPool;
     rml::internal::Backend *backend = &ePool->backend;
 
     for( int p=MaxThread; p>=MinThread; --p ) {
@@ -784,17 +784,25 @@ const int num_allocs = 10*1024;
 void *ptrs[num_allocs];
 tbb::atomic<int> alloc_counter;
 
+void multiThreadAlloc(size_t alloc_size) {
+    for( int i = alloc_counter++; i < num_allocs; i = alloc_counter++ ) {
+       ptrs[i] = scalable_malloc( alloc_size );
+       ASSERT( ptrs[i] != NULL, "scalable_malloc returned zero." );
+    }
+}
+void crossThreadDealloc() {
+    for( int i = --alloc_counter; i >= 0; i = --alloc_counter ) {
+       if (i < num_allocs) scalable_free( ptrs[i] );
+    }
+}
+
 template<int AllocSize>
 struct TestCleanAllBuffersBody : public SimpleBarrier {
     void operator() ( int ) const {
         barrier.wait();
-        for( int i = alloc_counter++; i < num_allocs; i = alloc_counter++ ) {
-           ptrs[i] = scalable_malloc( AllocSize );
-           ASSERT( ptrs[i] != NULL, "scalable_malloc returned zero." );
-        }
+        multiThreadAlloc(AllocSize);
         barrier.wait();
-        for( int i = --alloc_counter; i >= 0; i = --alloc_counter )
-           if (i<num_allocs) scalable_free( ptrs[i] );
+        crossThreadDealloc();
     }
 };
 
@@ -807,6 +815,7 @@ void TestCleanAllBuffers() {
     size_t memory_in_use_before = getMemSize();
     alloc_counter = 0;
     TestCleanAllBuffersBody<AllocSize>::initBarrier(num_threads);
+
     NativeParallelFor(num_threads, TestCleanAllBuffersBody<AllocSize>());
     // TODO: reproduce the bug conditions more reliably
     if ( defaultMemPool->extMemPool.backend.coalescQ.blocksToFree == NULL )
@@ -819,6 +828,39 @@ void TestCleanAllBuffers() {
     REMARK( "memory_in_use_before = %ld\nmemory_in_use_after = %ld\n", memory_in_use_before, memory_in_use_after );
     ASSERT( memory_leak == 0, "Cleanup was unable to release all allocated memory." );
 }
+
+//! Force cross thread deallocation of small objects to create a set of privatizable slab blocks.
+//! TBBMALLOC_CLEAN_THREAD_BUFFERS command have to privatize all the block.
+struct TestCleanThreadBuffersBody : public SimpleBarrier {
+    void operator() ( int ) const {
+        barrier.wait();
+        multiThreadAlloc(2*1024);
+        barrier.wait();
+        crossThreadDealloc();
+        barrier.wait();
+        int result = scalable_allocation_command(TBBMALLOC_CLEAN_THREAD_BUFFERS,0);
+        ASSERT(result == TBBMALLOC_OK, "Per-thread clean request has not cleaned anything.");
+
+        // Check that TLS was cleaned fully
+        TLSData *tlsCurr = defaultMemPool->getTLS(/*create=*/false);
+        for (int i = 0; i < numBlockBinLimit; i++) {
+            ASSERT(!(tlsCurr->bin[i].activeBlk), "Some bin was not cleaned.");
+        }
+        ASSERT(!(tlsCurr->lloc.head), "Local LOC was not cleaned.");
+        ASSERT(!(tlsCurr->freeSlabBlocks.head), "Free Block pool was not cleaned.");
+    }
+};
+
+void TestCleanThreadBuffers() {
+    const int num_threads = 8;
+    // Clean up if something was allocated before the test
+    scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS,0);
+
+    alloc_counter = 0;
+    TestCleanThreadBuffersBody::initBarrier(num_threads);
+    NativeParallelFor(num_threads, TestCleanThreadBuffersBody());
+}
+
 /*---------------------------------------------------------------------------*/
 /*------------------------- Large Object Cache tests ------------------------*/
 #if _MSC_VER==1600 || _MSC_VER==1500
@@ -1384,6 +1426,7 @@ int TestMain () {
     TestBackRef();
     TestCleanAllBuffers<4*1024>();
     TestCleanAllBuffers<16*1024>();
+    TestCleanThreadBuffers();
     TestPools();
     TestBackend();
 
index 7c3c055ecc57062f126c6b7f92d10c82bdc4d0d3..b8e9627388bec2e783b88b9b9be28bc37b45af3e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 4
index 0a512927eda1b7493bff747d8000d7546824e0c6..a49f0b4b84670d37dcb1bca08bee39a500f51877 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index 2bbe7c4f543db6f61567858b122cdbd16fedf585..3cec13f9460be1119df487e810cc812e6e849b34 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //------------------------------------------------------------------------
index 4d44965181b3a8842f4e9383040d85f6104d19e6..7759b8feb3d82e083b1aa9df43cb87c83705e6bc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/spin_mutex.h"
index f827535a394aecaf33826db8ca1e9566638890fa..dfc1444c6635bf3044c8e15c93b5dbbb6eebc0c3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 static size_t my_strlen( __constant char* str ) {
index 697977dc90c428e1e9c52ffe2bfb0c4f2616cfeb..bd7bc110cfcb37e21d240ceca0dcc883e8f41072 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_FLOW_GRAPH_NODES 1
index 4af719346f5bc9ad1be272ad287f3dca79abb35c..e264045fc931c52775a45d7789ffe512af1aef5a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test mixing OpenMP and TBB
index 050a5c7b1962c79bf9d42b0c89aea94de014e4b8..3e3fe3cab07a96f3a5eb111eff7ac6ecbebcc16a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index eab152e2d18a1875a350ba4f900f42d28b13224f..d741e72a1e91bf0f1b66fb65b672cb48eb30ceb8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/parallel_do.h"
index 6129d7402a25ad4d22e9d403358ef99bc88b2b46..a274ca3b15bb2cdfc9050acf7962bfeeb1fb4b08 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test for function template parallel_for.h
index 30f7b751368703e487fd9982fb5cfad8f1cb478a..577941a5f1d0c5fa80a5e1f7ab92199cbcf759ad 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
index 511b1d5399e11ac19111483534635295c6b5a7a9..c4d69cd9698d24ba60ea86b223df379b60d37cde 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // The test checks if the vectorization happens when PPL-style parallel_for is
index db265325bfe0d0c814b98f2a782535ab1f5a490e..ffc1e7225857ab23d45d38b30fe8e8457ba5a758 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
index 3f80235bbdee7f3febbddd8af8507ed38cbed42d..3e632ee7f8fda00843bd88a44284edbae2dcb57b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Before including pipeline.h, set up the variable to count heap allocated
index 6286e7a45f3e2a0ab60f7746f127f42f46fa8375..82455fce6222443504c49a82662ef7349453a7cc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 
index 4713b1842895a2fb493c4d1068b8926be7e31356..b65c68ff9c0becbf303c3889109507d5561c05d9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/parallel_scan.h"
index 0cd16f264357ee4db46d72a6427a19b596115ccb..e6db25109c89e7d2f95470c14501ad0a6f83be8e 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/parallel_sort.h"
index 3a094c85f3d8cccb448c5c1c59b52bb4cb61b309..e57429614dd03416e776e89b7aaee2378c498c94 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/parallel_while.h"
index 2ba0300207e41eaeb3716d6f7a26a5e94e1c34a6..3a182065d22c5a703d1a01b0ef4f70a7a5676c15 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if _MSC_VER==1500 && !__INTEL_COMPILER
index 3783e4a65a8644cb5be82ce8987acf529455e5c2..56adaeb38a9763acdc53095b1b0a1d90edbc4cad 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_assert.h"
index bc2582973175a87f4dc657f601803a61a8be665a..a73110675e2901a579173512ef542b87898bda85 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /* Common part for the partitioner whitebox tests */
index 1941335abdd07caaaea18d37afb38f62ef587e23..c83157abf09e4806b6097a6382a4b77f25fed8d8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_stddef.h"
index 84ac946ab347cd517e9cc918b141e663e218cf92..a72e443c7ccf32ce10295656d34d3b72e7f5e086 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/pipeline.h"
index f5e47d64bb159dcc540ce88610b9fb201d79ca30..4d8c70e3f898fddfdb1cb9283df418077029d8a9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // TO DO: Add overlapping put / receive tests
index cf9be4fa7b330a6eb0506897fc6ddec2f1c24fd6..5619c68e616402767dcb450f22ccf35de2779f3a 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // TO DO: Add overlapping put / receive tests
index 9a3e5a8da08fdb6246af3b00d57d1310b464050d..4ffa440954917d5bc1e8f906c1771e25484c94ca 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #ifndef __TBB_test_range_based_for_H
index a71f662f293f46578523572dc50ce11c604b98e0..20770a13ef0c164e3e2b801ce417daa0d1294828 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // test reader_writer_lock
index 35e367bc9c00323f8de2fc5af2889896c215d551..c2c3b55be582b6d363134cc67a79740acea49efd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if !(_WIN32||_WIN64) || (__MINGW64__||__MINGW32__)
index 2b04f2a43f59930c75d917a4313a84a17300be42..c39382723b5de5f81c33379b0cd74be574c7c65d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define HARNESS_DEFAULT_MIN_THREADS 4
index 8f80fe67a142d10bd061782a9bb6f00c0d219b8e..c81c0ab455b91c246c462b5147171bf4143ad600 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 //
index 87c9d9a91ddc17463bed5468ca5a629393abc0c6..4d40bed7af1684c447ac61747f4561a5f7e6ec7d 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 8edbfb906cf5f3ff44390f85ee9e24ff7b32ee0b..896c1af0e9c60249819d27fd87eb855d9bb94692 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // have to expose the reset_node method to be able to reset a function_body
index d562299e1f28acc57c445da6a24bd74fd09f089f..5a152cec1b117485c516e019e3a678e686bb8801 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness.h"
index 0625597bef0bdea31f32e8631b2a57f6b9c0074c..3e7836bd375eb48965da45ab4b38ac7b13033133 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_stddef.h"
index b6e1b30d97e2cd700b0afd42667ab21c538a44b9..1281fd651986bb7f657f3778a265a01d8ea73966 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_IMPLEMENT_CPP0X 1
index 80710c262fec96b1e6b588ba0af6cb7e237279f8..e0353129a137f499e534a31583fe8c5072984bdd 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_FLOW_GRAPH_NODES 1
index 22277f6fa643bd0f74e4c40d244d528f4609ca75..d177879fe249606e6b247f5f5f475bac2303cbe9 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define _VARIADIC_MAX 10   // Visual Studio 2012
@@ -177,7 +173,7 @@ void RunTests() {
     try {
         int *iip = cast_to<int *>(counted_array_tagged_msg);
         ASSERT(false, "did not throw on invalid cast");
-        *iip = 2;  // avoids "ipp set but not used" warning
+        *iip = 2;  // avoids "iip set but not used" warning
     }
     catch(std::runtime_error &re) {
         REMARK("attempt to cast to invalid type caught %s\n", re.what());
index a52c2059d337cc0f061904a3600b33293aa887af..fc8ce383e57034051dbbdf853bf6b07f52212f21 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_task.h"
index 2cc4db189bbf799631ac11dc4ffbdf91b4995c76..c68f23f5d4aa7c6a0bbed1432f17347ada381794 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define __TBB_EXTRA_DEBUG 1
@@ -1590,6 +1586,44 @@ void TestArenaWorkersMigration() {
     }
 }
 
+class CheckArenaNumThreads : public tbb::task {
+public:
+    static Harness::SpinBarrier m_barrier;
+
+    CheckArenaNumThreads(int nt, int rm):  num_threads(nt), reserved_for_masters(rm) {
+        m_barrier.initialize(2);
+    }
+
+    tbb::task* execute() __TBB_override {
+        ASSERT( tbb::this_task_arena::max_concurrency() == num_threads, "Wrong concurrency of current arena" );
+        ASSERT( tbb::this_task_arena::current_thread_index() >= reserved_for_masters, "Thread shouldn't attach to master's slots" );
+        m_barrier.wait();
+        return NULL;
+    }
+
+private:
+    const int num_threads;
+    const int reserved_for_masters;
+};
+
+Harness::SpinBarrier CheckArenaNumThreads::m_barrier;
+
+void TestTaskEnqueueInArena()
+{   
+    int pp[8]={3, 4, 5, 7, 8, 11, 13, 17};
+    for(int i = 0; i < 8; ++i)
+    {
+        int p = pp[i];
+        int reserved_for_masters = p - 1;
+        tbb::task_arena a(p, reserved_for_masters);
+        a.initialize();
+        CheckArenaNumThreads& t = *new( tbb::task::allocate_root() ) CheckArenaNumThreads(p, reserved_for_masters);
+        tbb::task::enqueue(t, a);
+        CheckArenaNumThreads::m_barrier.wait();
+        a.debug_wait_until_empty();
+    }
+}
+
 //--------------------------------------------------//
 
 int TestMain() {
@@ -1610,5 +1644,6 @@ int TestMain() {
     TestMoveSemantics();
     TestReturnValue();
     TestArenaWorkersMigration();
+    TestTaskEnqueueInArena();
     return Harness::Done;
 }
index a10c34fc62d8088b02c8159e856baa5ae2ed6e35..64d01a605a2c6871c98cc2fdc6627a06c8e50b06 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test correctness of forceful TBB initialization before any dynamic initialization
index c1197c98880a99680c49c963f1741096a27918ee..4d86c79a39dfe81264da95f08bd78ae36dadc623 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Testing automatic initialization of TBB task scheduler, so do not use task_scheduler_init anywhere.
index 158c1c2bebd7722f32dec261c6c5515833acf23c..35843712ea577a5492e1008d4d05bc1ac46d7db5 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_task.h"
index a7266e7b57d1a74429f0817b788904ce0ef344e3..4e106175cc88a145b839ba54a72e31d714943752 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "harness_defs.h"
index c64dd5ba132558797d69d704c3ec6369b4182af5..c09b267cea9dd67a6007e82c5a9e7ddf31608da6 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /*  The test uses "single produces multiple consumers" (SPMC )pattern to check
index 8417c858bdc2768f27eb97ee4c2723700db3a20f..e3af96fd95894e7a7b302fd0dde9aa5ccb1542fc 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index d06c36a5ead13a70b3af53e52e4066fa97d0598e..a3658f0dd603d0494d6539e27ac73fc91a8d8510 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // We want to test waiting for workers feature with non-preview binaries. However,
index 5b2387058009e40dc201c4f11b5f8a0472b142be..8e45b496bc704f307a3ad05d4b21c99d4d877eee 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // undefine __TBB_CPF_BUILD to simulate user's setup
index 8e562be2fb4ccfdd1fa576ad9b2ca0da695ead12..3bd40f829312e00aff5b99ce1fe993160846bbc3 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/task.h"
index 4ff620c677933a778d99ad86603bdd3575e89aeb..105bd44e326936d92fd9004fcee304918acc19a8 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_config.h"
index ff49c96e1af42a24f6114b036aa28a6548727e8f..e0ba3fbed4ce96a7c97b923d4870d7313266371c 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #define TBB_PREVIEW_WAITING_FOR_WORKERS 1
index 94dd8ebaed71b9ee475201d921349f3a2808f4d1..fedefedbef5c77ddb6bc786e3e010495e3652d03 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 /**
index 8307eafb8644994dcbe820c39e13b250283f5c89..d1bfd7e36f48b58bffae08ad312757b0bd7f38ff 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_thread.h"
index 803812eb5d487979174eb6fa990825d357ed8085..8f39e01aad1d71e47a0e5478c4e53b240cf1513b 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tbb_stddef.h"
@@ -229,7 +225,7 @@ int main(int argc, char *argv[] ) {
 void initialize_strings_vector(std::vector <string_pair>* vector)
 {
     vector->push_back(string_pair("TBB: VERSION\t\t2019.0", required));       // check TBB_VERSION
-    vector->push_back(string_pair("TBB: INTERFACE VERSION\t11005", required)); // check TBB_INTERFACE_VERSION
+    vector->push_back(string_pair("TBB: INTERFACE VERSION\t11006", required)); // check TBB_INTERFACE_VERSION
     vector->push_back(string_pair("TBB: BUILD_DATE", required));
     vector->push_back(string_pair("TBB: BUILD_HOST", required));
     vector->push_back(string_pair("TBB: BUILD_OS", required));
index 87a7191cb743540278f992f9ffaf35fdc72b32f1..d830a6dd8e0c9c8b28e8f97ca84cf261e31fbc92 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/atomic.h"
index eeb8f2d709645ed3814ccc66808c99698bd4308e..ea645c6e4a84b19f18d8df37799479ba37680200 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #include "tbb/tick_count.h"
@@ -66,26 +62,19 @@ static void WaitForDuration( double duration ) {
 //! Test that average timer overhead is within acceptable limit.
 /** The 'tolerance' value inside the test specifies the limit. */
 void TestSimpleDelay( int ntrial, double duration, double tolerance ) {
-    double total_worktime = 0;
+    int error_count = 0;
+    double delta = 0;
     // Iteration -1 warms up the code cache.
     for( int trial=-1; trial<ntrial; ++trial ) {
-        tbb::tick_count t0 = tbb::tick_count::now();
+        tbb::tick_count t = tbb::tick_count::now();
         if( duration ) WaitForDuration(duration);
-        tbb::tick_count t1 = tbb::tick_count::now();
-        if( trial>=0 ) {
-            total_worktime += (t1-t0).seconds();
+        delta = (tbb::tick_count::now() - t).seconds() - duration;
+        if( trial>=0 && delta > tolerance ) {
+            error_count++;
         }
+        ASSERT(delta >= 0,"Delta is negative");
     }
-    // Compute average worktime and average delta
-    double worktime = total_worktime/ntrial;
-    double delta = worktime-duration;
-    REMARK("worktime=%g delta=%g tolerance=%g\n", worktime, delta, tolerance);
-
-    // Check that delta is acceptable
-    if( delta<0 )
-        REPORT("ERROR: delta=%g < 0\n",delta);
-    if( delta>tolerance )
-        REPORT("%s: delta=%g > %g=tolerance where duration=%g\n",delta>3*tolerance?"ERROR":"Warning",delta,tolerance,duration);
+    ASSERT(error_count < ntrial / 4, "The number of errors exceeded the threshold");
 }
 
 //------------------------------------------------------------------------
@@ -156,7 +145,8 @@ void TestTickCountDifference( int n ) {
         // During 5 seconds we are trying to get 10 successful trials.
     } while ( ++num_trials < 10 && (tbb::tick_count::now() - start_time).seconds() < 5 );
     REMARK( "Difference test time: %g sec\n", (tbb::tick_count::now() - start_time).seconds() );
-    ASSERT( num_trials == 10, "The machine seems to be heavily oversubscibed, difference test was skipped." );
+    // TODO: Find the cause of the machine high load, fix it and upgrade ASSERT_WARNING to ASSERT
+    ASSERT_WARNING( num_trials == 10, "The machine seems to be heavily oversubscibed, difference test was skipped." );
     delete[] tick_count_array;
 }
 
@@ -188,9 +178,9 @@ int TestMain () {
     REMARK( "tolerance_multiplier = %g \n", tolerance_multiplier );
 
     tbb::tick_count t0 = tbb::tick_count::now();
-    TestSimpleDelay(/*ntrial=*/1000000,/*duration=*/0,    /*tolerance=*/2E-6 * tolerance_multiplier);
+    TestSimpleDelay(/*ntrial=*/1000000,/*duration=*/0,    /*tolerance=*/6E-6 * tolerance_multiplier);
     tbb::tick_count t1 = tbb::tick_count::now();
-    TestSimpleDelay(/*ntrial=*/1000,   /*duration=*/0.001,/*tolerance=*/5E-6 * tolerance_multiplier);
+    TestSimpleDelay(/*ntrial=*/1000,   /*duration=*/0.001,/*tolerance=*/15E-6 * tolerance_multiplier);
     tbb::tick_count t2 = tbb::tick_count::now();
     TestArithmetic(t0,t1,t2);
 
index aa97c1b92d91f85c11a6196ea18ed132c9918341..e1530197c9b1e439737f54fba316dd325b8fa124 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // tbb::flow::tuple (implementation used in tbb::flow)
index 0ece91821ac6bcd2c39db6bc9aa2359758a006ae..e5e9c8d5307774913a419b4a8d89a12109f4f1b1 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 #if __TBB_CPF_BUILD
index c10fd7037675a28244c4f7b04cea2b1895550c82..1d86238f8991fdf0bf83387a77f267859e34fb97 100644 (file)
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-
-
-
-
 */
 
 // Test that __TBB_Yield works.