Full Code of RcppCore/RcppParallel for AI

master e4e33f47ef06 cached
399 files
3.1 MB
843.2k tokens
2106 symbols
1 requests
Download .txt
Showing preview only (3,368K chars total). Download the full file or copy to clipboard to get everything.
Repository: RcppCore/RcppParallel
Branch: master
Commit: e4e33f47ef06
Files: 399
Total size: 3.1 MB

Directory structure:
gitextract_0_xjhq3b/

├── .Rbuildignore
├── .gitattributes
├── .github/
│   ├── .gitignore
│   └── workflows/
│       └── R-CMD-check.yaml
├── .gitignore
├── DESCRIPTION
├── NAMESPACE
├── NEWS.md
├── R/
│   ├── RcppParallel-package.R
│   ├── aaa.R
│   ├── flags.R
│   ├── options.R
│   ├── platform.R
│   ├── plugin.R
│   ├── skeleton.R
│   ├── tbb-autodetected.R.in
│   ├── tbb.R
│   ├── utils.R
│   └── zzz.R
├── README.md
├── RcppParallel.Rproj
├── cleanup
├── cleanup.win
├── configure
├── configure.win
├── doc/
│   └── rtools_tbb_notes.md
├── inst/
│   ├── .gitignore
│   ├── include/
│   │   ├── .gitignore
│   │   ├── RcppParallel/
│   │   │   ├── Backend.h
│   │   │   ├── Common.h
│   │   │   ├── RMatrix.h
│   │   │   ├── RVector.h
│   │   │   ├── TBB.h
│   │   │   ├── Timer.h
│   │   │   └── TinyThread.h
│   │   ├── RcppParallel.h
│   │   └── tthread/
│   │       ├── fast_mutex.h
│   │       ├── tinythread.h
│   │       └── tinythread.inl
│   ├── presentations/
│   │   ├── .gitignore
│   │   └── rcpp_parallel_talk_jan2015.Rmd
│   ├── rstudio/
│   │   └── templates/
│   │       └── project/
│   │           └── RcppParallel.package.skeleton.dcf
│   ├── skeleton/
│   │   ├── vector-sum.Rd
│   │   └── vector-sum.cpp
│   └── tests/
│       ├── cpp/
│       │   ├── distance.cpp
│       │   ├── innerproduct.cpp
│       │   ├── sum.cpp
│       │   ├── transform.cpp
│       │   └── truefalse_macros.cpp
│       ├── runit.distance.R
│       ├── runit.innerproduct.R
│       ├── runit.sum.R
│       ├── runit.transform.R
│       └── runit.truefalse_macros.R
├── man/
│   ├── RcppParallel-package.Rd
│   ├── RcppParallel.package.skeleton.Rd
│   ├── flags.Rd
│   ├── setThreadOptions.Rd
│   └── tbbLibraryPath.Rd
├── patches/
│   └── windows_arm64.diff
├── src/
│   ├── .gitignore
│   ├── Makevars.in
│   ├── init.cpp
│   ├── install.libs.R
│   ├── options.cpp
│   ├── tbb/
│   │   ├── .gitignore
│   │   ├── CMakeLists.txt
│   │   ├── CODEOWNERS
│   │   ├── CODE_OF_CONDUCT.md
│   │   ├── CONTRIBUTING.md
│   │   ├── INSTALL.md
│   │   ├── LICENSE.txt
│   │   ├── README.md
│   │   ├── RELEASE_NOTES.md
│   │   ├── SECURITY.md
│   │   ├── SUPPORT.md
│   │   ├── SYSTEM_REQUIREMENTS.md
│   │   ├── WASM_Support.md
│   │   ├── cmake/
│   │   │   ├── README.md
│   │   │   ├── android/
│   │   │   │   ├── device_environment_cleanup.cmake
│   │   │   │   ├── environment.cmake
│   │   │   │   └── test_launcher.cmake
│   │   │   ├── compilers/
│   │   │   │   ├── AppleClang.cmake
│   │   │   │   ├── Clang.cmake
│   │   │   │   ├── GNU.cmake
│   │   │   │   ├── Intel.cmake
│   │   │   │   ├── IntelLLVM.cmake
│   │   │   │   ├── MSVC.cmake
│   │   │   │   └── QCC.cmake
│   │   │   ├── config_generation.cmake
│   │   │   ├── hwloc_detection.cmake
│   │   │   ├── memcheck.cmake
│   │   │   ├── packaging.cmake
│   │   │   ├── post_install/
│   │   │   │   └── CMakeLists.txt
│   │   │   ├── python/
│   │   │   │   └── test_launcher.cmake
│   │   │   ├── resumable_tasks.cmake
│   │   │   ├── sanitize.cmake
│   │   │   ├── scripts/
│   │   │   │   └── cmake_gen_github_configs.cmake
│   │   │   ├── suppressions/
│   │   │   │   ├── lsan.suppressions
│   │   │   │   └── tsan.suppressions
│   │   │   ├── templates/
│   │   │   │   ├── TBBConfig.cmake.in
│   │   │   │   └── TBBConfigVersion.cmake.in
│   │   │   ├── test_spec.cmake
│   │   │   ├── toolchains/
│   │   │   │   ├── mips.cmake
│   │   │   │   └── riscv64.cmake
│   │   │   ├── utils.cmake
│   │   │   └── vars_utils.cmake
│   │   ├── include/
│   │   │   ├── oneapi/
│   │   │   │   ├── tbb/
│   │   │   │   │   ├── blocked_range.h
│   │   │   │   │   ├── blocked_range2d.h
│   │   │   │   │   ├── blocked_range3d.h
│   │   │   │   │   ├── blocked_rangeNd.h
│   │   │   │   │   ├── cache_aligned_allocator.h
│   │   │   │   │   ├── collaborative_call_once.h
│   │   │   │   │   ├── combinable.h
│   │   │   │   │   ├── concurrent_hash_map.h
│   │   │   │   │   ├── concurrent_lru_cache.h
│   │   │   │   │   ├── concurrent_map.h
│   │   │   │   │   ├── concurrent_priority_queue.h
│   │   │   │   │   ├── concurrent_queue.h
│   │   │   │   │   ├── concurrent_set.h
│   │   │   │   │   ├── concurrent_unordered_map.h
│   │   │   │   │   ├── concurrent_unordered_set.h
│   │   │   │   │   ├── concurrent_vector.h
│   │   │   │   │   ├── detail/
│   │   │   │   │   │   ├── _aggregator.h
│   │   │   │   │   │   ├── _aligned_space.h
│   │   │   │   │   │   ├── _allocator_traits.h
│   │   │   │   │   │   ├── _assert.h
│   │   │   │   │   │   ├── _attach.h
│   │   │   │   │   │   ├── _concurrent_queue_base.h
│   │   │   │   │   │   ├── _concurrent_skip_list.h
│   │   │   │   │   │   ├── _concurrent_unordered_base.h
│   │   │   │   │   │   ├── _config.h
│   │   │   │   │   │   ├── _containers_helpers.h
│   │   │   │   │   │   ├── _exception.h
│   │   │   │   │   │   ├── _export.h
│   │   │   │   │   │   ├── _flow_graph_body_impl.h
│   │   │   │   │   │   ├── _flow_graph_cache_impl.h
│   │   │   │   │   │   ├── _flow_graph_impl.h
│   │   │   │   │   │   ├── _flow_graph_indexer_impl.h
│   │   │   │   │   │   ├── _flow_graph_item_buffer_impl.h
│   │   │   │   │   │   ├── _flow_graph_join_impl.h
│   │   │   │   │   │   ├── _flow_graph_node_impl.h
│   │   │   │   │   │   ├── _flow_graph_node_set_impl.h
│   │   │   │   │   │   ├── _flow_graph_nodes_deduction.h
│   │   │   │   │   │   ├── _flow_graph_tagged_buffer_impl.h
│   │   │   │   │   │   ├── _flow_graph_trace_impl.h
│   │   │   │   │   │   ├── _flow_graph_types_impl.h
│   │   │   │   │   │   ├── _hash_compare.h
│   │   │   │   │   │   ├── _intrusive_list_node.h
│   │   │   │   │   │   ├── _machine.h
│   │   │   │   │   │   ├── _mutex_common.h
│   │   │   │   │   │   ├── _namespace_injection.h
│   │   │   │   │   │   ├── _node_handle.h
│   │   │   │   │   │   ├── _pipeline_filters.h
│   │   │   │   │   │   ├── _pipeline_filters_deduction.h
│   │   │   │   │   │   ├── _range_common.h
│   │   │   │   │   │   ├── _rtm_mutex.h
│   │   │   │   │   │   ├── _rtm_rw_mutex.h
│   │   │   │   │   │   ├── _scoped_lock.h
│   │   │   │   │   │   ├── _segment_table.h
│   │   │   │   │   │   ├── _small_object_pool.h
│   │   │   │   │   │   ├── _string_resource.h
│   │   │   │   │   │   ├── _task.h
│   │   │   │   │   │   ├── _task_handle.h
│   │   │   │   │   │   ├── _template_helpers.h
│   │   │   │   │   │   ├── _utils.h
│   │   │   │   │   │   └── _waitable_atomic.h
│   │   │   │   │   ├── enumerable_thread_specific.h
│   │   │   │   │   ├── flow_graph.h
│   │   │   │   │   ├── flow_graph_abstractions.h
│   │   │   │   │   ├── global_control.h
│   │   │   │   │   ├── info.h
│   │   │   │   │   ├── memory_pool.h
│   │   │   │   │   ├── mutex.h
│   │   │   │   │   ├── null_mutex.h
│   │   │   │   │   ├── null_rw_mutex.h
│   │   │   │   │   ├── parallel_for.h
│   │   │   │   │   ├── parallel_for_each.h
│   │   │   │   │   ├── parallel_invoke.h
│   │   │   │   │   ├── parallel_pipeline.h
│   │   │   │   │   ├── parallel_reduce.h
│   │   │   │   │   ├── parallel_scan.h
│   │   │   │   │   ├── parallel_sort.h
│   │   │   │   │   ├── partitioner.h
│   │   │   │   │   ├── profiling.h
│   │   │   │   │   ├── queuing_mutex.h
│   │   │   │   │   ├── queuing_rw_mutex.h
│   │   │   │   │   ├── rw_mutex.h
│   │   │   │   │   ├── scalable_allocator.h
│   │   │   │   │   ├── spin_mutex.h
│   │   │   │   │   ├── spin_rw_mutex.h
│   │   │   │   │   ├── task.h
│   │   │   │   │   ├── task_arena.h
│   │   │   │   │   ├── task_group.h
│   │   │   │   │   ├── task_scheduler_observer.h
│   │   │   │   │   ├── tbb_allocator.h
│   │   │   │   │   ├── tbbmalloc_proxy.h
│   │   │   │   │   ├── tick_count.h
│   │   │   │   │   └── version.h
│   │   │   │   └── tbb.h
│   │   │   └── tbb/
│   │   │       ├── blocked_range.h
│   │   │       ├── blocked_range2d.h
│   │   │       ├── blocked_range3d.h
│   │   │       ├── blocked_rangeNd.h
│   │   │       ├── cache_aligned_allocator.h
│   │   │       ├── collaborative_call_once.h
│   │   │       ├── combinable.h
│   │   │       ├── concurrent_hash_map.h
│   │   │       ├── concurrent_lru_cache.h
│   │   │       ├── concurrent_map.h
│   │   │       ├── concurrent_priority_queue.h
│   │   │       ├── concurrent_queue.h
│   │   │       ├── concurrent_set.h
│   │   │       ├── concurrent_unordered_map.h
│   │   │       ├── concurrent_unordered_set.h
│   │   │       ├── concurrent_vector.h
│   │   │       ├── enumerable_thread_specific.h
│   │   │       ├── flow_graph.h
│   │   │       ├── flow_graph_abstractions.h
│   │   │       ├── global_control.h
│   │   │       ├── info.h
│   │   │       ├── memory_pool.h
│   │   │       ├── mutex.h
│   │   │       ├── null_mutex.h
│   │   │       ├── null_rw_mutex.h
│   │   │       ├── parallel_for.h
│   │   │       ├── parallel_for_each.h
│   │   │       ├── parallel_invoke.h
│   │   │       ├── parallel_pipeline.h
│   │   │       ├── parallel_reduce.h
│   │   │       ├── parallel_scan.h
│   │   │       ├── parallel_sort.h
│   │   │       ├── partitioner.h
│   │   │       ├── profiling.h
│   │   │       ├── queuing_mutex.h
│   │   │       ├── queuing_rw_mutex.h
│   │   │       ├── rw_mutex.h
│   │   │       ├── scalable_allocator.h
│   │   │       ├── spin_mutex.h
│   │   │       ├── spin_rw_mutex.h
│   │   │       ├── task.h
│   │   │       ├── task_arena.h
│   │   │       ├── task_group.h
│   │   │       ├── task_scheduler_observer.h
│   │   │       ├── tbb.h
│   │   │       ├── tbb_allocator.h
│   │   │       ├── tbbmalloc_proxy.h
│   │   │       ├── tick_count.h
│   │   │       └── version.h
│   │   ├── integration/
│   │   │   ├── cmake/
│   │   │   │   └── generate_vars.cmake
│   │   │   ├── linux/
│   │   │   │   ├── env/
│   │   │   │   │   ├── vars.sh
│   │   │   │   │   └── vars.sh.in
│   │   │   │   ├── modulefiles/
│   │   │   │   │   ├── tbb
│   │   │   │   │   └── tbb32
│   │   │   │   ├── oneapi/
│   │   │   │   │   └── vars.sh
│   │   │   │   └── sys_check/
│   │   │   │       └── sys_check.sh
│   │   │   ├── mac/
│   │   │   │   └── env/
│   │   │   │       ├── vars.sh
│   │   │   │       └── vars.sh.in
│   │   │   ├── pkg-config/
│   │   │   │   └── tbb.pc.in
│   │   │   └── windows/
│   │   │       ├── env/
│   │   │       │   ├── vars.bat
│   │   │       │   └── vars.bat.in
│   │   │       ├── nuget/
│   │   │       │   ├── inteltbb.devel.win.targets
│   │   │       │   └── inteltbb.redist.win.targets
│   │   │       ├── oneapi/
│   │   │       │   └── vars.bat
│   │   │       └── sys_check/
│   │   │           └── sys_check.bat
│   │   ├── src/
│   │   │   ├── tbb/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── address_waiter.cpp
│   │   │   │   ├── allocator.cpp
│   │   │   │   ├── arena.cpp
│   │   │   │   ├── arena.h
│   │   │   │   ├── arena_slot.cpp
│   │   │   │   ├── arena_slot.h
│   │   │   │   ├── assert_impl.h
│   │   │   │   ├── cancellation_disseminator.h
│   │   │   │   ├── co_context.h
│   │   │   │   ├── concurrent_bounded_queue.cpp
│   │   │   │   ├── concurrent_monitor.h
│   │   │   │   ├── concurrent_monitor_mutex.h
│   │   │   │   ├── def/
│   │   │   │   │   ├── lin32-tbb.def
│   │   │   │   │   ├── lin64-tbb.def
│   │   │   │   │   ├── mac64-tbb.def
│   │   │   │   │   ├── win32-tbb.def
│   │   │   │   │   └── win64-tbb.def
│   │   │   │   ├── dynamic_link.cpp
│   │   │   │   ├── dynamic_link.h
│   │   │   │   ├── environment.h
│   │   │   │   ├── exception.cpp
│   │   │   │   ├── global_control.cpp
│   │   │   │   ├── governor.cpp
│   │   │   │   ├── governor.h
│   │   │   │   ├── intrusive_list.h
│   │   │   │   ├── itt_notify.cpp
│   │   │   │   ├── itt_notify.h
│   │   │   │   ├── mailbox.h
│   │   │   │   ├── main.cpp
│   │   │   │   ├── main.h
│   │   │   │   ├── market.cpp
│   │   │   │   ├── market.h
│   │   │   │   ├── market_concurrent_monitor.h
│   │   │   │   ├── misc.cpp
│   │   │   │   ├── misc.h
│   │   │   │   ├── misc_ex.cpp
│   │   │   │   ├── observer_proxy.cpp
│   │   │   │   ├── observer_proxy.h
│   │   │   │   ├── parallel_pipeline.cpp
│   │   │   │   ├── permit_manager.h
│   │   │   │   ├── pm_client.h
│   │   │   │   ├── private_server.cpp
│   │   │   │   ├── profiling.cpp
│   │   │   │   ├── queuing_rw_mutex.cpp
│   │   │   │   ├── rml_base.h
│   │   │   │   ├── rml_tbb.cpp
│   │   │   │   ├── rml_tbb.h
│   │   │   │   ├── rml_thread_monitor.h
│   │   │   │   ├── rtm_mutex.cpp
│   │   │   │   ├── rtm_rw_mutex.cpp
│   │   │   │   ├── scheduler_common.h
│   │   │   │   ├── semaphore.cpp
│   │   │   │   ├── semaphore.h
│   │   │   │   ├── small_object_pool.cpp
│   │   │   │   ├── small_object_pool_impl.h
│   │   │   │   ├── task.cpp
│   │   │   │   ├── task_dispatcher.cpp
│   │   │   │   ├── task_dispatcher.h
│   │   │   │   ├── task_group_context.cpp
│   │   │   │   ├── task_stream.h
│   │   │   │   ├── tbb.rc
│   │   │   │   ├── tcm.h
│   │   │   │   ├── tcm_adaptor.cpp
│   │   │   │   ├── tcm_adaptor.h
│   │   │   │   ├── thread_control_monitor.h
│   │   │   │   ├── thread_data.h
│   │   │   │   ├── thread_dispatcher.cpp
│   │   │   │   ├── thread_dispatcher.h
│   │   │   │   ├── thread_dispatcher_client.h
│   │   │   │   ├── thread_request_serializer.cpp
│   │   │   │   ├── thread_request_serializer.h
│   │   │   │   ├── threading_control.cpp
│   │   │   │   ├── threading_control.h
│   │   │   │   ├── threading_control_client.h
│   │   │   │   ├── tls.h
│   │   │   │   ├── tools_api/
│   │   │   │   │   ├── disable_warnings.h
│   │   │   │   │   ├── ittnotify.h
│   │   │   │   │   ├── ittnotify_config.h
│   │   │   │   │   ├── ittnotify_static.c
│   │   │   │   │   ├── ittnotify_static.h
│   │   │   │   │   ├── ittnotify_types.h
│   │   │   │   │   └── legacy/
│   │   │   │   │       └── ittnotify.h
│   │   │   │   ├── version.cpp
│   │   │   │   └── waiters.h
│   │   │   ├── tbbbind/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── def/
│   │   │   │   │   ├── lin32-tbbbind.def
│   │   │   │   │   ├── lin64-tbbbind.def
│   │   │   │   │   ├── mac64-tbbbind.def
│   │   │   │   │   ├── win32-tbbbind.def
│   │   │   │   │   └── win64-tbbbind.def
│   │   │   │   ├── tbb_bind.cpp
│   │   │   │   └── tbb_bind.rc
│   │   │   ├── tbbmalloc/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── Customize.h
│   │   │   │   ├── MapMemory.h
│   │   │   │   ├── Statistics.h
│   │   │   │   ├── Synchronize.h
│   │   │   │   ├── TypeDefinitions.h
│   │   │   │   ├── backend.cpp
│   │   │   │   ├── backend.h
│   │   │   │   ├── backref.cpp
│   │   │   │   ├── def/
│   │   │   │   │   ├── lin32-tbbmalloc.def
│   │   │   │   │   ├── lin64-tbbmalloc.def
│   │   │   │   │   ├── mac64-tbbmalloc.def
│   │   │   │   │   ├── win32-tbbmalloc.def
│   │   │   │   │   └── win64-tbbmalloc.def
│   │   │   │   ├── frontend.cpp
│   │   │   │   ├── large_objects.cpp
│   │   │   │   ├── large_objects.h
│   │   │   │   ├── shared_utils.h
│   │   │   │   ├── tbbmalloc.cpp
│   │   │   │   ├── tbbmalloc.rc
│   │   │   │   ├── tbbmalloc_internal.h
│   │   │   │   └── tbbmalloc_internal_api.h
│   │   │   └── tbbmalloc_proxy/
│   │   │       ├── CMakeLists.txt
│   │   │       ├── def/
│   │   │       │   ├── lin32-proxy.def
│   │   │       │   └── lin64-proxy.def
│   │   │       ├── function_replacement.cpp
│   │   │       ├── function_replacement.h
│   │   │       ├── proxy.cpp
│   │   │       ├── proxy.h
│   │   │       ├── proxy_overload_osx.h
│   │   │       └── tbbmalloc_proxy.rc
│   │   └── third-party-programs.txt
│   ├── tbb-compat/
│   │   └── tbb-compat.cpp
│   └── tbb.cpp
├── tests/
│   └── doRUnit.R
└── tools/
    ├── config/
    │   ├── cleanup.R
    │   └── configure.R
    ├── config.R
    └── tbb/
        ├── disable-pragmas.R
        ├── fix-memset.R
        └── update-tbb.R

================================================
FILE CONTENTS
================================================

================================================
FILE: .Rbuildignore
================================================
^.*\.Rproj$
^.travis.yml
^README.md
^\.Rprofile$
^\.Rproj\.user$
^appveyor\.yml$
^check$
^doc$
^gen$
^libs$
^inst/lib$
^inst/libs$
^revdep$
^src/.*\.o$
^src/tbb/build$
^tags$
^tests/testthat/pkg/RcppParallelTest/src/.*\.dll$
^tests/testthat/pkg/RcppParallelTest/src/.*\.s?o$
^tools/tbb$
^\.github$
^patches

================================================
FILE: .gitattributes
================================================
Makevars  text eol=lf


================================================
FILE: .github/.gitignore
================================================
*.html


================================================
FILE: .github/workflows/R-CMD-check.yaml
================================================
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

name: R-CMD-check

jobs:
  R-CMD-check:
    runs-on: ${{ matrix.config.os }}

    name: ${{ matrix.config.os }} (${{ matrix.config.r }})

    strategy:
      fail-fast: false
      matrix:
        config:
          - {os: macOS-latest,   r: 'release'}
          - {os: ubuntu-latest,  r: 'release'}
          - {os: windows-latest, r: 'release'}
    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
      R_KEEP_PKG_SOURCE: yes
    steps:
      - uses: actions/checkout@v3

      - uses: r-lib/actions/setup-r@v2
        with:
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck
          needs: check

      - uses: r-lib/actions/check-r-package@v2


================================================
FILE: .gitignore
================================================
.Rprofile
.Rproj.user
.Rhistory
.RData
.DS_Store
check
inst/doc
inst/lib
inst/libs
libs
revdep
src-i386
src-x64
tbb.log

src/tbb/build
src/tbb/build-tbb

R/tbb-autodetected.R



================================================
FILE: DESCRIPTION
================================================
Package: RcppParallel
Type: Package
Title: Parallel Programming Tools for 'Rcpp'
Version: 5.1.10.9000
Authors@R: c(
    person("Kevin", "Ushey", role = c("aut", "cre"), email = "kevin@rstudio.com",
        comment = c(ORCID = "0000-0003-2880-7407")),
    person("JJ", "Allaire", role = c("aut"), email = "jj@rstudio.com"),
    person("Romain", "Francois", role = c("aut", "cph")),
    person("Gregory", "Vandenbrouck", role = "aut"),
    person("Marcus", "Geelnard", role = c("aut", "cph"),
       comment = "TinyThread library, https://tinythreadpp.bitsnbites.eu/"),
    person("Hamada S.", "Badr", email = "badr@jhu.edu", role = c("ctb"),
       comment = c(ORCID = "0000-0002-9808-2344")),
    person("Dirk", "Eddelbuettel", role = c("aut"), email = "edd@debian.org",
        comment = c(ORCID = "0000-0001-6419-907X")),
    person(family = "Intel", role = c("aut", "cph"), comment = "oneTBB library"),
    person(family = "UXL Foundation", role = c("aut", "cph"), comment = "oneTBB library"),
    person(family = "Microsoft", role = "cph"),
    person(family = "Posit, PBC", role = "cph")
    )
Description: High level functions for parallel programming with 'Rcpp'.
    For example, the 'parallelFor()' function can be used to convert the work of
    a standard serial "for" loop into a parallel one and the 'parallelReduce()'
    function can be used for accumulating aggregate or other values.
Depends: R (>= 3.6.0)
Suggests:
    Rcpp,
    RUnit,
    knitr,
    rmarkdown
Roxygen: list(markdown = TRUE)
SystemRequirements: CMake (>= 3.5)
License: GPL (>= 3)
URL: https://rcppcore.github.io/RcppParallel/, https://github.com/RcppCore/RcppParallel
BugReports: https://github.com/RcppCore/RcppParallel/issues
Biarch: TRUE
RoxygenNote: 7.3.2
Encoding: UTF-8


================================================
FILE: NAMESPACE
================================================
# Generated by roxygen2: do not edit by hand

export(CxxFlags)
export(LdFlags)
export(RcppParallel.package.skeleton)
export(RcppParallelLibs)
export(defaultNumThreads)
export(setThreadOptions)
export(tbbLibraryPath)


================================================
FILE: NEWS.md
================================================

## RcppParallel 6.0.0  (UNRELEASED)

* RcppParallel no longer includes tbb headers as part of the RcppParallel/TBB.h
  header, and instead only exposes its TBB-specific APIs for parallel work.
  
* RcppParallel now bundles oneTBB 2022.0.0. Note that the TBB ABI has changed;
  packages which depend on RcppParallel may need to be rebuilt.
  
* On Windows, RcppParallel now uses the copy of TBB provided by Rtools.
  If TBB is not available, RcppParallel will use only the fallback 'tinythread'
  implementation. In practice, this implies that RcppParallel will now only
  provide a TBB backend with R (>= 4.2.0).

## RcppParallel 5.1.11

* Compatibility fixes for LLVM 21.

## RcppParallel 5.1.10

* Fixed an issue where packages linking to RcppParallel could inadverently
  depend on internals of the TBB library available during compilation, even
  if the package did not explicitly use TBB itself.

## RcppParallel 5.1.9

* RcppParallel no longer passes `-rpath` when building / linking on Windows.
  This fixes build issues when building RcppParallel when using the LLVM
  linker on Windows. (@kalibera)
  
## RcppParallel 5.1.8

* RcppParallel now explicitly links to the bundled copy of TBB on macOS. (#206; @jeroen)

## RcppParallel 5.1.7

* Remove deprecated `std::iterator`. (#192; @Enchufa2)

## RcppParallel 5.1.6

* Patch for TBB to allow compilation with gcc-13.

* Fixed a memory leak that could occur when using TinyThread on POSIX systems.
  (#185; @dipertix and and @kevinushey)

## RcppParallel 5.1.5

* Patches to ensure compatibility with the R 4.2.0 UCRT toolchain on Windows,
  adapted from patches contributed by Tomas Kalibera.

* Fixed an issue where setting `TBB_ROOT` (or `TBB_INC` / `TBB_LIB`) would
  copy rather than symlink the associated libraries. (#161)

## RcppParallel 5.1.4

* Fixed an issue causing client packages of RcppParallel to fail to compile
  on Solaris.

## RcppParallel 5.1.3

* Fixed an issue that prevented compilation of RcppParallel with R (< 4.0.0)
  of R on Windows.

* The `RCPP_PARALLEL_USE_TBBMALLOC_PROXY` environment variable can now be used
  to control whether RcppParallel loads the `tbbmalloc_proxy` library on load.
  See https://www.threadingbuildingblocks.org/docs/help/tbb_userguide/Automically_Replacing_malloc.html
  for more information.

## RcppParallel 5.1.2

* `RcppParallel` gains the `tbbLibraryPath()` function, to be used when attempting
  to query the location of the TBB libraries that `RcppParallel` has been
  configured to use. This may be useful for R packages which wish to explicitly
  use, or link to, these libraries.

## RcppParallel 5.1.1

* Updated bundled version of TBB (Intel TBB 2019 Update 8).

* RcppParallel can now be configured to use an external copy of TBB, via the
  `TBB_LIB` and `TBB_INC` environment variables. These should be set to the
  directories containing the TBB libraries and headers, respectively.
  
* Added support for the latest versions of Intel oneAPI TBB / oneTBB.

* Updated TBB functionality for the new interface.

* Falling back to building TBB from local source code.

* Backward TBB compatibility based on `__TBB_tbb_stddef_H`.

* Resolved conflicts between system and local TBB headers.

* Fixed URLs, used HTTPS, and minor cleanups.

* Updated package DESCRIPTION and bumped version.

* `setThreadOptions(...)` can again be called multiple times per session.
  The requested number of threads will be used for invocations to `parallelFor()`
  and `parallelReduce()` that don't explicitly request a specific number of threads.
  
* The `parallelFor()` and `parallelReduce()` functions gain the `numThreads`
  argument, allowing one to limit the number of threads used for a
  particular computation.

## RcppParallel 5.0.3

* Fixed compilation on macOS M1 machines.

## RcppParallel 5.0.2

* `setThreadOptions(...)` can now only be called once per session, to avoid
  segfaults when compiling RcppParallel / TBB with gcc 10.1. Subsequent
  calls to `setThreadOptions(...)` are ignored.

## RcppParallel 5.0.1

* Fixed compilation issue on OpenSUSE Tumbleweed with -flto=auto

* Fixed compilation when CPPFLAGS = -I/usr/local/include and a version
  of libtbb is installed there

## RcppParallel 5.0.0

* RcppParallel backend can now be customized with RCPP_PARALLEL_BACKEND
  environment variable (supported values are 'tbb' and 'tinythread')
  
* Fixed issue when compiling RcppParallel on macOS Catalina

* Fixed issue when compiling RcppParallel with Rtools40

## RcppParallel 4.4.4

* Fixed an issue when compiling RcppParallel with clang-9 on Fedora

## RcppParallel 4.4.3

* Suppress gcc-9 warnings related -Wclass-memaccess

* Added TBB headers for serial TBB operations (#90, @mikejiang)

* Fixed row iterator constructor (#87, @wtianyi)

* Fixed compilation on FreeBSD

## RcppParallel 4.4.2

* Suppress gcc-8 warnings related to -Wclass-memaccess

* Use PKG_CXXFLAGS rather than PKG_CPPFLAGS

* Remove unused dependency on the BH package

## RcppParallel 4.4.1

* Ensure user-specified R configuration passed to TBB

* Work around warnings emitted by gcc 8

## RcppParallel 4.4.0

* Respect user-defined compiler settings (e.g. from ~/.R/Makevars).

* Remove TBB's attempts to suppress compiler diagnostics.

* Allow setting the number of threads to use via RCPP_PARALLEL_NUM_THREADS
  environment variable.

* Update to TBB 2018 Update 1.

* Add native registration of compiled functions.

## RcppParallel 4.3.20

* Add support for Rtools 3.3 w/ GCC 4.9

## RcppParallel 4.3.14

* Add support for TBB on Solaris

* Fix failure to compile on OS X Snow Leopard R toolchain

* Add const and non-const operator[] for RMatrix class

## RcppParallel 4.3.8

* Add tbbmalloc library

* Correctly pass clang to TBB configure when R is using clang

## RcppParallel 4.3.6

* Support for TBB on Windows

## RcppParallel 4.3.3

* Update to TBB 4.3 (fixes clang compilation error in platform.h)

* Forward CXX to TBB Makefile

## RcppParallel 4.2.5

* Initial release


================================================
FILE: R/RcppParallel-package.R
================================================

#' Parallel programming tools for Rcpp
#' 
#' High level functions for doing parallel programming with Rcpp.  For example,
#' the `parallelFor()` function can be used to convert the work of a
#' standard serial "for" loop into a parallel one, and the `parallelReduce()`
#' function can be used for accumulating aggregate or other values.
#' 
#' The high level interface enables safe and robust parallel programming
#' without direct manipulation of operating system threads. On Windows, macOS,
#' and Linux systems the underlying implementation is based on Intel TBB
#' (Threading Building Blocks). On other platforms, a less-performant fallback
#' implementation based on the TinyThread library is used.
#' 
#' For additional documentation, see the package website at:
#' 
#' <https://rcppcore.github.io/RcppParallel/>
#' 
#' 
#' @name RcppParallel-package
#' @docType package
#' @aliases RcppParallel RcppParallel-package
#' @keywords package parallel
NULL


================================================
FILE: R/aaa.R
================================================

# stubs that get overridden via configure script
TBB_ENABLED <- TRUE
TBB_LIB  <- ""
TBB_INC  <- ""

TBB_NAME <- "tbb"
TBB_MALLOC_NAME <- "tbbmalloc"

================================================
FILE: R/flags.R
================================================

#' Compilation flags for RcppParallel
#'
#' Output the compiler or linker flags required to build against RcppParallel.
#'
#' These functions are typically called from `Makevars` as follows:
#'
#' ```
#' PKG_LIBS += $(shell "${R_HOME}/bin/Rscript" -e "RcppParallel::LdFlags()")
#' ```
#'
#' On Windows, the flags ensure that the package links with the built-in TBB
#' library. On Linux and macOS, the output is empty, because TBB is loaded
#' dynamically on load by `RcppParallel`.
#'
#' \R packages using RcppParallel should also add the following to their
#' `NAMESPACE` file:
#'
#' ```
#' importFrom(RcppParallel, RcppParallelLibs)
#' ```
#'
#' This is necessary to ensure that \pkg{RcppParallel} (and so, TBB) is loaded
#' and available.
#'
#' @name flags
#' @rdname flags
#' @aliases RcppParallelLibs LdFlags CxxFlags
#'
#' @return Returns \code{NULL}, invisibly. These functions are called for
#'   their side effects (writing the associated flags to stdout).
#'
NULL


#' @name flags
#' @export
CxxFlags <- function() {
   cat(tbbCxxFlags())
}

#' @name flags
#' @export
LdFlags <- function() {
   cat(tbbLdFlags())
}

#' @name flags
#' @export
RcppParallelLibs <- function() {
   LdFlags()
}



================================================
FILE: R/options.R
================================================

#' Thread options for RcppParallel
#' 
#' Set thread options (number of threads to use for task scheduling and stack
#' size per-thread) for RcppParallel.
#' 
#' RcppParallel is automatically initialized with the default number of threads
#' and thread stack size when it loads. You can call `setThreadOptions()` at
#' any time to change the defaults.
#' 
#' The `parallelFor()` and `parallelReduce()` also accept `numThreads` as
#' an argument, if you'd like to control the number of threads specifically
#' to be made available for a particular parallel function call. Note that
#' this value is advisory, and TBB may choose a smaller number of threads
#' if the number of requested threads cannot be honored on the system.
#' 
#' @aliases setThreadOptions defaultNumThreads
#' 
#' @param numThreads
#'   Number of threads to use for task scheduling. Call `defaultNumThreads()`
#'   to determine the the default value used for "auto".
#'   
#' @param stackSize
#'   Stack size (in bytes) to use for worker threads. The
#'   default used for "auto" is 2MB on 32-bit systems and 4MB on 64-bit systems
#'   (note that this parameter has no effect on Windows).
#'   
#' @return
#'   `defaultNumThreads()` returns the default number of threads used by
#'   RcppParallel, if another value isn't specified either via
#'   `setThreadOptions()` or explicitly in calls to `parallelFor()` and
#'   `parallelReduce()`.
#'
#' @examples
#' 
#' \dontrun{
#' library(RcppParallel)
#' setThreadOptions(numThreads = 4)
#' defaultNumThreads()
#' }
#' 
#' @export setThreadOptions
setThreadOptions <- function(numThreads = "auto",
                             stackSize = "auto")
{
   # validate and resolve numThreads
   if (identical(numThreads, "auto"))
      numThreads <- -1L
   else if (!is.numeric(numThreads))
      stop("numThreads must be an integer")
   else
      numThreads <- as.integer(numThreads)
   
   # validate and resolve stackSize
   if (identical(stackSize, "auto"))
      stackSize <- 0L
   else if (!is.numeric(stackSize))
      stop("stackSize must be an integer")
   else
      stackSize <- as.integer(stackSize)
   
   # set RCPP_PARALLEL_NUM_THREADS
   if (numThreads == -1L)
      Sys.unsetenv("RCPP_PARALLEL_NUM_THREADS")
   else
      Sys.setenv(RCPP_PARALLEL_NUM_THREADS = numThreads)
   
   # set RCPP_PARALLEL_STACK_SIZE
   if (stackSize == 0L)
      Sys.unsetenv("RCPP_PARALLEL_STACK_SIZE")
   else
      Sys.setenv(RCPP_PARALLEL_STACK_SIZE = stackSize)
}

#' @rdname setThreadOptions
#' @export
defaultNumThreads <- function() {
   .Call("defaultNumThreads", PACKAGE = "RcppParallel")
}

isUsingTbb <- function() {
   backend <- Sys.getenv("RCPP_PARALLEL_BACKEND", "tbb")
   identical(backend, "tbb")
}



================================================
FILE: R/platform.R
================================================

is_windows <- function() {
   .Platform$OS.type == "windows"
}

is_mac <- function() {
   Sys.info()[["sysname"]] == "Darwin"
}

is_unix <- function() {
   .Platform$OS.type == "unix"
}

is_solaris <- function() {
   Sys.info()[["sysname"]] == "SunOS"
}

is_sparc <- function() {
   info <- Sys.info()
   all(
      info[["sysname"]] == "SunOS",
      info[["machine"]] != "i86pc"
   )
}




================================================
FILE: R/plugin.R
================================================

# Inline plugin used by sourceCpp.
inlineCxxPlugin <- function() {
   
   list(
      env = list(
         PKG_CXXFLAGS = tbbCxxFlags(),
         PKG_LIBS = tbbLdFlags()
      ),
      includes  = "#include <RcppParallel.h>",
      LinkingTo = "RcppParallel",
      body      = identity,
      Depends   = "RcppParallel"
   )
}


================================================
FILE: R/skeleton.R
================================================

#' Create a skeleton for a new package depending on RcppParallel
#' 
#' \code{RcppParallel.package.skeleton} automates the creation of a new source
#' package that intends to use features of RcppParallel.
#' 
#' It is based on the \link[utils]{package.skeleton} function which it executes
#' first.
#' 
#' In addition to \link[Rcpp]{Rcpp.package.skeleton} :
#' 
#' The \samp{DESCRIPTION} file gains an Imports line requesting that the
#' package depends on RcppParallel and a LinkingTo line so that the package
#' finds RcppParallel header files.
#' 
#' The \samp{NAMESPACE} gains a \code{useDynLib} directive as well as an
#' \code{importFrom(RcppParallel, evalCpp} to ensure instantiation of
#' RcppParallel.
#' 
#' The \samp{src} directory is created if it does not exists and a
#' \samp{Makevars} file is added setting the environment variables
#' \samp{PKG_LIBS} to accomodate the necessary flags to link with the
#' RcppParallel library.
#' 
#' If the \code{example_code} argument is set to \code{TRUE}, example files
#' \samp{vector-sum.cpp} is created in the \samp{src} directory.
#' \code{Rcpp::compileAttributes()} is then called to generate
#' \code{src/RcppExports.cpp} and \code{R/RcppExports.R}. These files are given
#' as an example and should eventually by removed from the generated package.
#' 
#' @param name The name of your R package.
#' @param example_code If \code{TRUE}, example C++ code using RcppParallel is
#' added to the package.
#' @param ... Optional arguments passed to \link[Rcpp]{Rcpp.package.skeleton}.
#' @return Nothing, used for its side effects
#' @seealso \link[utils]{package.skeleton}
#' @references Read the \emph{Writing R Extensions} manual for more details.
#' 
#' Once you have created a \emph{source} package you need to install it: see
#' the \emph{R Installation and Administration} manual, \code{\link{INSTALL}}
#' and \code{\link{install.packages}}.
#' @keywords programming
#' @examples
#' 
#' \dontrun{
#' # simple package
#' RcppParallel.package.skeleton("foobar")
#' }
#' 
#' @export RcppParallel.package.skeleton
RcppParallel.package.skeleton <- function(name = "anRpackage",
                                          example_code = TRUE,
                                          ...)
{
   # call Rcpp.package.skeleton() -- provide 'list' explicitly
   # and clean up after
   env <- new.env(parent = emptyenv())
   env$dummy <- NULL
   Rcpp::Rcpp.package.skeleton(
      name = name,
      attributes = FALSE,
      module = FALSE,
      example_code = FALSE,
      environment = env,
      list = "dummy",
      ...
   )
   
   # move to generated package directory
   owd <- setwd(name)
   on.exit(setwd(owd), add = TRUE)
   
   # remove dummy stuff
   unlink("data", recursive=TRUE)
   unlink("man/dummy.Rd")
   unlink("Read-and-delete-me")
   lns <- readLines("NAMESPACE")
   writeLines(lns[!grepl("dummy", lns)], "NAMESPACE")
   unlink("src/init.c")
   
   message("\nAdding RcppParallel settings")
   
   # update DESCRIPTION file
   desc <- read.dcf("DESCRIPTION", all = TRUE, keep.white = TRUE)
   version <- sprintf("RcppParallel (>= %s)", utils::packageVersion("RcppParallel"))
   
   desc$Imports <- paste0(desc$Imports, ", ", version)
   message(" >> added Imports: ", desc$Imports)
   
   desc$LinkingTo <- paste0(desc$LinkingTo, ", RcppParallel")
   message(" >> added LinkingTo: ", desc$LinkingTo)
   
   desc$SystemRequirements <- "GNU make"
   message(" >> added SystemRequirements: GNU make")
   
   write.dcf(desc, file = "DESCRIPTION", keep.white = TRUE)
   
   # update NAMESPACE file
   message(" >> added importFrom(RcppParallel,RcppParallelLibs) directive to NAMESPACE")
   cat("importFrom(RcppParallel,RcppParallelLibs)",
      file = "NAMESPACE",
      sep = "\n",
      append = TRUE)
   
   # write Makevars files
   dir.create("src", showWarnings = FALSE)
   
   # src/Makevars
   message(" >> added src/Makevars")
   cat(
      c(
         '# We also need importFrom(RcppParallel,RcppParallelLibs) in NAMESPACE',
         'PKG_LIBS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::RcppParallelLibs()")'
      ),
      file = "src/Makevars",
      sep = "\n"
   )
   
   # src/Makevars.win
   message(" >> added src/Makevars.win")
   cat(
      c(
         'PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=1',
         'PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::RcppParallelLibs()")'
      ),
      file = "src/Makevars.win",
      sep = "\n"
   )
   
   # write an example script using RcppParallel
   if (example_code) {
      
      message(" >> added example file src/vector-sum.cpp")
      file.copy(
         system.file("skeleton/vector-sum.cpp", package = "RcppParallel"),
         "src/vector-sum.cpp"
      )
      
      message(" >> added example documentation man/vector-sum.Rd")
      file.copy(
         system.file("skeleton/vector-sum.Rd", package = "RcppParallel"),
         "man/vector-sum.Rd"
      )
      
      message(" >> compiled Rcpp attributes")
      Rcpp::compileAttributes()
   }
   
   TRUE
}


================================================
FILE: R/tbb-autodetected.R.in
================================================

TBB_ENABLED <- @TBB_ENABLED@
TBB_LIB  <- "@TBB_LIB@"
TBB_INC  <- "@TBB_INC@"

TBB_NAME <- "@TBB_NAME@"
TBB_MALLOC_NAME <- "@TBB_MALLOC_NAME@"

================================================
FILE: R/tbb.R
================================================

#' Get the Path to a TBB Library
#'
#' Retrieve the path to a TBB library. This can be useful for \R packages
#' using RcppParallel that wish to use, or re-use, the version of TBB that
#' RcppParallel has been configured to use.
#'
#' @param name
#'   The name of the TBB library to be resolved. Normally, this is one of
#'   `tbb`, `tbbmalloc`, or `tbbmalloc_proxy`. When `NULL`, the library
#'   path containing the TBB libraries is returned instead.
#'
#' @export
tbbLibraryPath <- function(name = NULL) {

   # library paths for different OSes
   sysname <- Sys.info()[["sysname"]]

   # find root for TBB install
   tbbRoot <- Sys.getenv("TBB_LIB", unset = tbbRoot())
   if (is.null(name))
      return(tbbRoot)

   # form library names
   tbbLibNames <- list(
      "Darwin"  = paste0("lib", name, ".dylib"),
      "Windows" = paste0("lib", name, c("12", ""), ".a"),
      "SunOS"   = paste0("lib", name, ".so"),
      "Linux"   = paste0("lib", name, c(".so.2", ".so"))
   )

   # skip systems that we know not to be compatible
   isCompatible <- !is_sparc() && !is.null(tbbLibNames[[sysname]])
   if (!isCompatible)
      return(NULL)

   # find the request library (if any)
   libNames <- tbbLibNames[[sysname]]
   for (libName in libNames) {
      
      tbbName <- file.path(tbbRoot, libName)
      if (file.exists(tbbName))
         return(tbbName)
      
      arch <- if (nzchar(.Platform$r_arch)) .Platform$r_arch
      suffix <- paste(c("lib", arch, libName), collapse = "/")
      tbbName <- system.file(suffix, package = "RcppParallel")
      if (file.exists(tbbName))
         return(tbbName)
      
   }

}

tbbCxxFlags <- function() {

  if (!TBB_ENABLED)
      return("-DRCPP_PARALLEL_USE_TBB=0")
   
   flags <- c("-DRCPP_PARALLEL_USE_TBB=1")

   # if TBB_INC is set, apply those library paths
   tbbInc <- Sys.getenv("TBB_INC", unset = TBB_INC)
   if (!file.exists(tbbInc)) {
      tbbInc <- system.file("include", package = "RcppParallel")
   }
   
   # add include path
   if (nzchar(tbbInc) && file.exists(tbbInc)) {
      
      # prefer new interface if version.h exists -- we keep this
      # for compatibility with packages like StanHeaders, rstan
      versionPath <- file.path(tbbInc, "tbb/version.h")
      if (file.exists(versionPath))
         flags <- c(flags, "-DTBB_INTERFACE_NEW")
      
      # now add the include path
      flags <- c(flags, paste0("-I", asBuildPath(tbbInc)))
      
   }

   # return flags as string
   paste(flags, collapse = " ")

}

# Return the linker flags required for TBB on this platform
tbbLdFlags <- function() {
   
   # on Windows, we statically link to oneTBB
   if (is_windows()) {
      
      libPath <- system.file("libs", package = "RcppParallel")
      if (nzchar(.Platform$r_arch))
         libPath <- file.path(libPath, .Platform$r_arch)
      
      ldFlags <- sprintf("-L%s -lRcppParallel", asBuildPath(libPath))
      return(ldFlags)
      
   }
   
   # shortcut if TBB_LIB defined
   tbbLib <- Sys.getenv("TBB_LINK_LIB", Sys.getenv("TBB_LIB", unset = TBB_LIB))
   if (nzchar(tbbLib)) {
      if (R.version$os == "emscripten") {
         fmt <- "-L%1$s -l%2$s"
         return(sprintf(fmt, asBuildPath(tbbLib), TBB_NAME))
      }
      fmt <- "-L%1$s -Wl,-rpath,%1$s -l%2$s -l%3$s"
      return(sprintf(fmt, asBuildPath(tbbLib), TBB_NAME, TBB_MALLOC_NAME))
   }
   
   # explicitly link on macOS
   # https://github.com/RcppCore/RcppParallel/issues/206
   if (is_mac()) {
      fmt <- "-L%s -l%s -l%s"
      return(sprintf(fmt, asBuildPath(tbbLibraryPath()), TBB_NAME, TBB_MALLOC_NAME))
   }

   # nothing required on other platforms
   ""

}

tbbRoot <- function() {

   if (nzchar(TBB_LIB))
      return(TBB_LIB)

   rArch <- .Platform$r_arch
   parts <- c("lib", if (nzchar(rArch)) rArch)
   libDir <- paste(parts, collapse = "/")
   system.file(libDir, package = "RcppParallel")

}


================================================
FILE: R/utils.R
================================================

# generate paths consumable by the compilers and linkers
# in particular, on Windows and Solaris, this means the path _cannot_ be quoted !!
asBuildPath <- function(path) {

   # normalize paths using forward slashes
   path <- normalizePath(path, winslash = "/", mustWork = FALSE)

   # prefer short path names if the path has spaces
   if (is_windows() && grepl(" ", path, fixed = TRUE))
      path <- utils::shortPathName(path)

   # if we still have spaces, and we're not Windows or Solaris, try quoting
   if (grepl(" ", path, fixed = TRUE) && !is_solaris())
      path <- shQuote(path)

   # ensure we use forward slashes, even on Windows
   path <- chartr("\\", "/", path)

   # return path
   path

}



================================================
FILE: R/zzz.R
================================================

# !diagnostics suppress=.dllInfo,.tbbDllInfo,.tbbMallocDllInfo,.tbbMallocProxyDllInfo

# NOTE: we intentionally do _not_ load tbbmalloc_proxy by default, as its
# intended use is to replace the default allocator, something that may be
# dangerous to do by default. in addition, TBB's documentation recommends
# only loading explicitly via e.g. LD_PRELOAD
.dllInfo               <- NULL
.tbbDllInfo            <- NULL
.tbbMallocDllInfo      <- NULL
.tbbMallocProxyDllInfo <- NULL

loadTbbLibrary <- function(name) {
   # TBB is statically linked on Windows
   if (is_windows()) {
      return(NULL)
   }
   path <- tbbLibraryPath(name)
   if (is.null(path))
      return(NULL)
   
   if (!file.exists(path)) {
      warning("TBB library ", shQuote(name), " not found.")
      return(NULL)
   }
   
   dyn.load(path, local = FALSE, now = TRUE)
   
}

.onLoad <- function(libname, pkgname) {
   
   # on Windows, load RcppParallel first
   if (.Platform$OS.type == "windows") {
      .dllInfo <<- library.dynam("RcppParallel", pkgname, libname)
   }
   
   # load tbb, tbbmalloc
   .tbbDllInfo       <<- loadTbbLibrary("tbb")
   .tbbMallocDllInfo <<- loadTbbLibrary("tbbmalloc")
   
   # load tbbmalloc_proxy, but only if requested
   useTbbMallocProxy <- Sys.getenv("RCPP_PARALLEL_USE_TBBMALLOC_PROXY", unset = "FALSE")
   if (useTbbMallocProxy %in% c("TRUE", "True", "true", "1"))
      .tbbMallocProxyDllInfo <<- loadTbbLibrary("tbbmalloc_proxy")
   
   # load RcppParallel library if available
   if (.Platform$OS.type != "windows") {
      .dllInfo <<- library.dynam("RcppParallel", pkgname, libname, local = FALSE)
   }
   
}

.onUnload <- function(libpath) {
   
   # unload the package library
   if (!is.null(.dllInfo))
      library.dynam.unload("RcppParallel", libpath)
   
   # NOTE: we do not explicitly unload tbbmalloc_proxy as switching
   # the allocator at runtime can cause issues
   
   # unload tbbmalloc if we loaded it
   if (!is.null(.tbbMallocDllInfo))
      dyn.unload(.tbbMallocDllInfo[["path"]])
   
   # unload tbb if we loaded it
   if (!is.null(.tbbDllInfo))
      dyn.unload(.tbbDllInfo[["path"]])
   
}


================================================
FILE: README.md
================================================

## RcppParallel

<!-- badges: start -->
[![CRAN](https://www.r-pkg.org/badges/version/RcppParallel)](https://cran.r-project.org/package=RcppParallel)
[![R-CMD-check](https://github.com/RcppCore/RcppParallel/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RcppCore/RcppParallel/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

High level functions for parallel programming with Rcpp. The `parallelFor()` function can be used to convert the work of a standard serial "for" loop into a parallel one, and the `parallelReduce()` function can be used for accumulating aggregate or other values.

The high level interface enables safe and robust parallel programming without direct manipulation of operating system threads. On Windows, macOS, and Linux systems, the underlying implementation is based on [Intel TBB](https://github.com/oneapi-src/oneTBB) (Threading Building Blocks). On other platforms, a less-performant fallback implementation based on the [TinyThread](https://tinythreadpp.bitsnbites.eu/) library is used.

For additional documentation on using RcppParallel see the package website at http://rcppcore.github.io/RcppParallel/.


### Intel TBB

`RcppParallel` supports the new interface of Intel TBB, and can be configured to use an external copy of TBB (e.g., with [`oneTBB`](https://github.com/oneapi-src/oneTBB) or the system TBB library), using the `TBB_LIB` and `TBB_INC` environment variables.

To build the development version of `RcppParallel` with [`oneTBB`](https://github.com/oneapi-src/oneTBB):

- Install [`oneTBB`](https://github.com/oneapi-src/oneTBB).

For example, installing [`oneTBB`](https://github.com/oneapi-src/oneTBB) on Linux 64-bit (`x86_64`) to `$HOME` directory (change if needed!):

```bash
TBB_RELEASE="https://api.github.com/repos/oneapi-src/oneTBB/releases/latest"
TBB_TAG=$(curl --silent $TBB_RELEASE | grep -Po '"tag_name": "\K.*?(?=")')
TBB_VERSION=${TBB_TAG#?}

wget https://github.com/oneapi-src/oneTBB/releases/download/v$TBB_VERSION/oneapi-tbb-$TBB_VERSION-lin.tgz
tar zxvf oneapi-tbb-$TBB_VERSION-lin.tgz -C $HOME

export TBB="$HOME/oneapi-tbb-$TBB_VERSION"
```
Note that you may replace `TBB_VERSION=${TBB_TAG#?}` with a custom version number if needed ( check available releases [here](https://github.com/oneapi-src/oneTBB/releases) ).

- Set the TBB environment variables (specifically: `TBB` for the installation prefix, `TBB_INC` for the directory that includes the header files, and `TBB_LIB` for the libraries directory).

For example, installing [`oneTBB`](https://github.com/oneapi-src/oneTBB) on Linux 64-bit (`x86_64`) to `$HOME` directory (change if needed!):

```bash
source $TBB/env/vars.sh intel64

export TBB_INC="$TBB/include"
export TBB_LIB="$TBB/lib/intel64/gcc4.8"
```

- Build the development version of `RcppParallel`:

```r
install.packages("remotes")
remotes::install_github("RcppCore/RcppParallel")
```


### License

The RcppParallel package is made available under the [GPLv2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) license.

The [TinyThread library](https://tinythreadpp.bitsnbites.eu/) is licensed under the [zlib/libpng](https://opensource.org/licenses/zlib-license.php) license.

The Intel TBB Library is licensed under the Apache 2.0 license, as described at https://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt.


================================================
FILE: RcppParallel.Rproj
================================================
Version: 1.0
ProjectId: 8e3d73b0-404c-42f5-b2ef-46f759f65dd4

RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: No

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 3
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes

BuildType: Package
PackageCleanBeforeInstall: No
PackageInstallArgs: --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace


================================================
FILE: cleanup
================================================
#!/usr/bin/env sh
: "${R_HOME=`R RHOME`}"
"${R_HOME}/bin/Rscript" tools/config.R cleanup "$@"


================================================
FILE: cleanup.win
================================================
#!/usr/bin/env sh
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" tools/config.R cleanup "$@"


================================================
FILE: configure
================================================
#!/usr/bin/env sh
: "${R_HOME=`R RHOME`}"
"${R_HOME}/bin/Rscript" tools/config.R configure "$@"


================================================
FILE: configure.win
================================================
#!/usr/bin/env sh
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" tools/config.R configure "$@"


================================================
FILE: doc/rtools_tbb_notes.md
================================================
# Differences MinGW / Rtools

## cmd

### MinGW

cmd is an sh wrapper which invokes the 32bit version of Windows' shell:

	$ where cmd
	C:\MinGW\msys\1.0\bin\cmd
	c:\Windows\System32\cmd.exe
	$ cat /c/MinGW/msys/1.0/bin/cmd
	#!/bin/sh
	# Copyright (C) 2002, Earnie Boyd
	#   mailto:earnie@users.sf.net
	# This file is part of Minimal SYStem.
	#   http://www.mingw.org/msys.shtml
	# File: cmd

	"$COMSPEC" "$@"
	$ echo $COMSPEC
	C:\windows\SysWOW64\cmd.exe
	
### Rtools

No wrapper; cmd is the default Windows shell (64bit on a 64bit OS):

	$ where cmd
	C:\Windows\System32\cmd.exe
	

## paths

### MinGW

- 3 styles supported: `/drive/path`, `drive:/path`, `drive:\path` (properly escaped).
- The *actual* path (returned when querying) is `/drive/path`.


		$ cd f:/tmp/testpath
		$ pwd
		/f/tmp/testpath
		$ cd f:\\tmp\\testpath
		$ pwd
		/f/tmp/testpath
		$ cd /f/tmp/testpath
		$ pwd
		/f/tmp/testpath	
	
### Rtools

- 3 styles supported: `/cygdrive/drive/path`, `drive:/path`, `drive:\path` (properly escaped).
- The *actual* path (returned when querying) is `/cygdrive/drive/path`.
- `/drive/path` is **not** supported.

		$ cd f:/tmp/testpath
		$ pwd
		/cygdrive/f/tmp/testpath
		$ cd f:\\tmp\\testpath
		$ pwd
		/cygdrive/f/tmp/testpath
		$ cd /f/tmp/testpath
		cd: can't cd to /f/tmp/testpath
		$ cd /cygdrive/f/tmp/testpath
		$ pwd
		/cygdrive/f/tmp/testpath
		

## parameters

### MinGW

Shell will sometimes automatically replace parameters starting with forward slashes using the rules described [here](http://www.mingw.org/wiki/Posix_path_conversion). 
Since forward slashes are often used to mark option parameters in Windows command line applications (/o is the Windows equivalent of -o and --option for Unix), this can cause very subtle and hard to debug issues. The fix is to double the forward slashes, or to quote (when possible)

	$ ls /d
	$RECYCLE.BIN  System Volume Information  pagefile.sys

	$ cmd /c "echo hi"
	hi

	$ cmd /C "echo hi"
	Microsoft Windows [Version 6.3.9600]
	(c) 2013 Microsoft Corporation. All rights reserved.

	f:\tmp\testpath>exit

	$ cmd /C "echo hi /runtime"
	'untime"' is not recognized as an internal or external command,
	operable program or batch file.
	
	$ cmd //C "echo hi /runtime"
	hi /runtime


### Rtools

No parameter replacements. What you type is what you get.

	$ ls /d
	ls: cannot access /d: No such file or directory
	$ cmd /c "echo hi"
	hi
	$ cmd /C "echo hi"
	hi
	$ cmd /C "echo hi /runtime"
	hi /runtime


## uname

Only present in MinGW

## g++

### MinGW

default full paths supported

	$ g++ /f/tmp/testpath/test.cpp
	$ echo $?
	0

### Rtools

default full paths are not supported

	$ ls /cygdrive/f/tmp/testpath/test.cpp
	/cygdrive/f/tmp/testpath/test.cpp
	$ cat /cygdrive/f/tmp/testpath/test.cpp
	int main() {return 0;}	
	$ g++ /cygdrive/f/tmp/testpath/test.cpp
	g++.exe: error: /cygdrive/f/tmp/testpath/test.cpp: No such file or directory
	g++.exe: fatal error: no input files
	compilation terminated.

This means that great care must be taken to ensure paths are never queried and instead always manually constructed. Examples of queried paths that end up being g++ incompatible in the context of a Makefile:

- don't use `$(shell pwd)`
- don't use `$(CURDIR)`
- only use **relative paths** in `VPATH`
		

		$ cat Makefile
		.PHONY: all
		all: test.o foo.o
			@echo DIR=$(CURDIR)

		%.o: %.cpp
			@echo $<

		$  make VPATH=f:/tmp/testpath/subdir
		test.cpp
		/cygdrive/f/tmp/testpath/subdir/foo.cpp
		DIR=/cygdrive/f/tmp/testpath
		
		$ make VPATH=subdir
		test.cpp
		subdir/foo.cpp
		DIR=/cygdrive/f/tmp/testpath
		
# Bugs and tips

## Modal dialog asking to insert disk in drive

This bug is in MinGW only (not Rtools). This is due to hard-coded paths pointing to I: drive in g++

	$ strings c:/MinGW/bin/g++.exe | grep i: | grep mingw
	i:/p/giaw/mingw/share/locale
	i:/p/giaw/mingw/share/locale
	
If no I: drive exists, or the path does not exist, then g++ silently ignores it. *However*, if I: happens to point to a removable drive, then you get a modal dialog.

Fix: go in "Disk Management" and rename the drive.

## Full paths

g++ is not the only tool affected by full paths in the context of Rtools. Since Rtools doesn't perform any auto-conversion and `/` is used as a option marker for many Windows command line applications, 
some of them end up being confused. For example:

	$ cat test.js
	WScript.Echo( "Hi" );
	$ cscript /nologo test.js
	Hi
	$ pwd
	/cygdrive/f/tmp/testpath
	$ cscript /nologo /cygdrive/f/tmp/testpath/test.js
	Input Error: Unknown option "/cygdrive/f/tmp/testpath/test.js" specified.
	$ cscript /nologo f:/tmp/testpath/test.js
	Hi
	$

Recommendation is to always use relative paths.

## Changing the shell in make

The `.SHELLFLAGS` variable doesn't work in the context of Rtools (silently ignored), making it impossible to change default shell to cmd: the default for SHELLFLAGS is `-c`, which is suitable for `sh` and not `cmd`:


	$ cmd /c dir /b notfound
	File Not Found
	$ cmd -c dir /b notfound
	Microsoft Windows [Version 6.3.9600]
	(c) 2013 Microsoft Corporation. All rights reserved.

	F:\tmp\testpath>exit

	$ cat Makefile
	SHELL=cmd
	.SHELLFLAGS=/c
	TEST=$(shell dir /b notfound)

	.PHONY: all
	all:
        @echo hi

	$ make
	Microsoft Windows [Version 6.3.9600]
	(c) 2013 Microsoft Corporation. All rights reserved.

	F:\tmp\testpath>exit
	

The Rtools-only `--win32` command line option for make didn't properly work for me (but I was dealing with complex Makefiles).

## Hangs in make

There does not appear to be a built-in tracing or time-out mechanism in make regarding sub-processes. One effective way to figure out what's hanging is "Task Manager", "Details", then add column "Command Line".
In my case, most hangs were due to some variation of `cmd -c something` or `cmd c: something` (both variations end up leaving cmd.exe running) instead of `cmd /c something`. The first one is due to SHELLFLAGS not working, the second to auto param replacement.

## Rule not found errors

i.e. "no rule to make target" errors.  
In some cases, the `VPATH` parser gets confused, and then **all** paths specified are *silently* ignored. This can even happen for simple (no spaces, etc.), valid (exist) paths.

	$ cat Makefile
	.PHONY: all
	all: test.o foo.o
		@echo hi

	%.o: %.cpp
		@echo $<
	$ pwd
	/cygdrive/f/tmp/testpath
	$ make "VPATH=f:/tmp/testpath/subdir"
	test.cpp
	/cygdrive/f/tmp/testpath/subdir/foo.cpp
	hi
	$ make "VPATH=f:/tmp/testpath subdir"
	test.cpp
	subdir/foo.cpp
	hi
	$ make "VPATH=subdir f:/tmp/testpath"
	test.cpp
	subdir/foo.cpp
	hi
	$ make "VPATH=f:/tmp/testpath f:/tmp/testpath/subdir"
	test.cpp
	make: *** No rule to make target `foo.o', needed by `all'.  Stop.


### Incorrect rule firing

These can be caused by the previous issue: VPATH not working, therefore target file not found, therefore other rule firing.

This can also be caused by MinGW and RTools using a different version of make. A quick way to test it is to manually/explicitly create the rule, and see if it is firing. 





================================================
FILE: inst/.gitignore
================================================
lib/
libs/


================================================
FILE: inst/include/.gitignore
================================================

# These TBB libraries are copied in at configure time.
/index.html
/oneapi
/serial
/tbb



================================================
FILE: inst/include/RcppParallel/Backend.h
================================================

#ifndef __RCPP_PARALLEL_BACKEND__
#define __RCPP_PARALLEL_BACKEND__

#include <cstdlib>
#include <cstring>

extern "C" {
void REprintf(const char*, ...);
}

namespace RcppParallel {
namespace internal {

enum backend_type {
   BACKEND_TBB,
   BACKEND_TINYTHREAD
};

#if RCPP_PARALLEL_USE_TBB

inline backend_type defaultBackend()
{
   return BACKEND_TBB;
}

#else

inline backend_type defaultBackend()
{
   return BACKEND_TINYTHREAD;
}

#endif

inline const char* backendToString(backend_type backend)
{
   switch (backend)
   {
   case BACKEND_TBB:
      return "tbb";
   case BACKEND_TINYTHREAD:
      return "tinythread";
   }

   // shouldn't be reached but need to silence compiler warnings
   return "tbb";
}

inline backend_type backend()
{
   const char* requestedBackend = std::getenv("RCPP_PARALLEL_BACKEND");
   if (requestedBackend == NULL)
   {
      return defaultBackend();
   }
   else if (std::strcmp(requestedBackend, "tbb") == 0)
   {
#if RCPP_PARALLEL_USE_TBB
      return BACKEND_TBB;
#else
      const char* msg =
         "tbb backend is not available; using tinythread instead";
      
      REprintf("%s\n", msg);
      return BACKEND_TINYTHREAD;
#endif
   }
   else if (strcmp(requestedBackend, "tinythread") == 0)
   {
      return BACKEND_TINYTHREAD;
   }
   else
   {
      const char* fmt = "unknown parallel backend '%s'; using '%s' instead\n";
      REprintf(fmt, requestedBackend, backendToString(defaultBackend()));
      return defaultBackend();
   }
}

} // namespace internal
} // namespace RcppParallel

#endif /* __RCPP_PARALLEL_BACKEND__ */


================================================
FILE: inst/include/RcppParallel/Common.h
================================================
#ifndef __RCPP_PARALLEL_COMMON__
#define __RCPP_PARALLEL_COMMON__

#include <cerrno>
#include <cstddef>
#include <cstdlib>

#include <algorithm>
#include <memory>
#include <functional>
#include <utility>

namespace RcppParallel {

template <typename T, typename U>
inline int resolveValue(const char* envvar,
                        T requestedValue,
                        U defaultValue)
{
   // if the requested value is non-zero and not the default, we can use it
   bool useRequestedValue =
      requestedValue != static_cast<T>(defaultValue) &&
      requestedValue > 0;
   
   if (useRequestedValue)
      return requestedValue;

   // otherwise, try reading the default from associated envvar
   // if the environment variable is unset, use the default
   const char* var = getenv(envvar);
   if (var == NULL)
      return defaultValue;

   // try to convert the string to a number
   // if an error occurs during conversion, just use default
   errno = 0;
   char* end;
   long value = strtol(var, &end, 10);

   // check for conversion failure
   if (end == var || *end != '\0' || errno == ERANGE)
      return defaultValue;

   // okay, return the parsed environment variable value
   return value;
}

// Tag type used for disambiguating splitting constructors
struct Split {};

// Work executed within a background thread. We implement dynamic
// dispatch using vtables so we can have a stable type to cast
// to from the void* passed to the worker thread (required because
// the tinythreads interface allows to pass only a void* to the
// thread main rather than a generic type / template)
struct Worker
{
   // construct and destruct (delete virtually)
   Worker() {}
   virtual ~Worker() {}

   // dispatch work over a range of values
   virtual void operator()(std::size_t begin, std::size_t end) = 0;

private:
   // disable copying and assignment
   Worker(const Worker&);
   void operator=(const Worker&);
};

// Used for controlling the stack size for threads / tasks within a scope.
class ThreadStackSizeControl
{
public:
   ThreadStackSizeControl();
   ~ThreadStackSizeControl();

private:
   // COPYING: not copyable
   ThreadStackSizeControl(const ThreadStackSizeControl&);
   ThreadStackSizeControl& operator=(const ThreadStackSizeControl&);
};


} // namespace RcppParallel


#endif // __RCPP_PARALLEL_COMMON__


================================================
FILE: inst/include/RcppParallel/RMatrix.h
================================================
#ifndef __RCPP_PARALLEL_RMATRIX__
#define __RCPP_PARALLEL_RMATRIX__

#include <cstddef>
#include <iterator>

namespace RcppParallel {

template <typename T>
class RMatrix {
public:
   class Row {
   
   public:   
      
      template <typename V>
      class row_iterator {
      
      public:
         using iterator_category = std::random_access_iterator_tag;
         using value_type = V;
         using difference_type = std::size_t;
         using pointer = value_type*;
         using reference = value_type&;

         inline row_iterator(Row& row, difference_type i)
            : start_(row.start_), parentNrow_(row.parent_.nrow()), index_(i)
         {
         }
         
         inline row_iterator(pointer start, difference_type parentNrow, difference_type index)
            : start_(start), parentNrow_(parentNrow), index_(index)
         {      
         }
         
         inline row_iterator(const row_iterator& other) 
            : start_(other.start_), 
              parentNrow_(other.parentNrow_), 
              index_(other.index_)
         {
         }
         
         inline row_iterator& operator++() { 
            index_++;
            return *this;
         }
         
         inline row_iterator operator++(int) {
            row_iterator tmp(*this); 
            operator++(); 
            return tmp;
         }
         
         inline row_iterator& operator--() {
            index_-- ;
            return *this ;
         }
         
         inline row_iterator operator--(int) {
            row_iterator tmp(*this);
            index_-- ;
            return tmp ;
         }

         row_iterator operator+(difference_type n) const {
            return row_iterator(start_, parentNrow_ ,index_ + n ) ; 
         }
         row_iterator operator-(difference_type n) const {
            return row_iterator(start_, parentNrow_, index_ - n ) ; 
         }
         
         difference_type operator+(const row_iterator& other) const {
            return index_ + other.index_;
         }
         
         difference_type operator-(const row_iterator& other) const {
            return index_ - other.index_ ; 
         }
         
         row_iterator& operator+=(difference_type n) { index_ += n ; return *this; }
         row_iterator& operator-=(difference_type n) { index_ -= n ; return *this; }
         
         bool operator==(const row_iterator& other) const { return index_ == other.index_; }
         bool operator!=(const row_iterator& other) const { return index_ != other.index_; }
         bool operator<(const row_iterator& other) const { return index_ < other.index_; }
         bool operator>(const row_iterator& other) const { return index_ > other.index_; }
         bool operator<=(const row_iterator& other) const { return index_ <= other.index_; }
         bool operator>=(const row_iterator& other) const { return index_ >= other.index_; }
         

         inline reference operator*() { return start_[index_ * parentNrow_]; }
         
         inline pointer operator->() { return &(start_[index_ * parentNrow_]); }
      
         inline reference operator[](int i) { return start_[(index_+i) * parentNrow_]; }
         
      private:
         pointer start_;
         difference_type parentNrow_;
         difference_type index_;
      };
      
      typedef row_iterator<T> iterator;
      typedef row_iterator<const T> const_iterator;
      
      inline Row(RMatrix& parent, std::size_t i)
         : parent_(parent),
           start_(parent.begin() + i)
      {
      }
      
      inline Row(const Row& other)
         : parent_(other.parent_),
           start_(other.start_)
      {        
      }
      
      inline iterator begin() {
         return iterator(*this, 0);
      }
      
      inline iterator end() {
         return iterator(*this, parent_.ncol());
      }
      
      inline const_iterator begin() const {
         return const_iterator(*this, 0);
      }
      
      inline const_iterator end() const {
         return const_iterator(*this, parent_.ncol());
      }
      
      inline size_t length() const {
         return parent_.ncol();
      }

      inline size_t size() const {
        return parent_.ncol();
      }

      inline T& operator[](std::size_t i) {
        return start_[i * parent_.nrow()];
      }
      
      inline const T& operator[](std::size_t i) const {
        return start_[i * parent_.nrow()];
      }
              
   private:
      RMatrix& parent_;
      T* start_;
   };
   
   class Column {
   
   public:
   
      typedef T* iterator;
      typedef const T* const_iterator;
   
      inline Column(RMatrix& parent, std::size_t i) 
         : begin_(parent.begin() + (i * parent.nrow())),
           end_(begin_ + parent.nrow())
      {   
      }
      
      inline Column(const Column& other) 
         : begin_(other.begin_), end_(other.end_)
      {   
      }
      
      inline Column& operator=(const Column& rhs) {
         begin_ = rhs.begin_;
         end_ = rhs.end_;
         return *this;
      }
      
      inline iterator begin() { return begin_; }
      inline iterator end() { return end_; }
      
      inline const_iterator begin() const { return begin_; }
      inline const_iterator end() const { return end_; }
      
      inline size_t length() const { return end_ - begin_; }
      inline size_t size() const { return end_ - begin_; }
      
      inline T& operator[](std::size_t i) {
        return *(begin_ + i);
      }
      
      inline const T& operator[](std::size_t i) const {
        return *(begin_ + i);
      }
      
   private:
      T* begin_;
      T* end_;
   };

   typedef T* iterator;
   typedef const T* const_iterator;

   template <typename Source>
   inline explicit RMatrix(const Source& source) 
      : data_(const_cast<Source&>(source).begin()),
        nrow_(source.nrow()),
        ncol_(source.ncol())
   {
   }

   inline RMatrix(T* data, std::size_t nrow, std::size_t ncol) 
      : data_(data), nrow_(nrow), ncol_(ncol) 
   {
   }
   
   inline iterator begin() { return data_; }
   inline iterator end() { return data_ + length(); }
   
   inline const_iterator begin() const { return data_; }
   inline const_iterator end() const { return data_ + length(); }
     
   inline std::size_t length() const { return nrow_ * ncol_; }  
     
   inline std::size_t nrow() const { return nrow_; }
   inline std::size_t ncol() const { return ncol_; }
   
   inline T& operator()(std::size_t i, std::size_t j) {
      return *(data_ + (i + j * nrow_));
   }
   
   inline const T& operator()(std::size_t i, std::size_t j) const {
      return *(data_ + (i + j * nrow_));
   }
   
   inline Row row(std::size_t i) {
      return Row(*this, i);
   }
   
   inline const Row row(std::size_t i) const {
      return Row(*const_cast<RMatrix*>(this), i);
   }
   
   inline Column column(std::size_t i) {
      return Column(*this, i);
   }
   
   inline const Column column(std::size_t i) const {
      return Column(*const_cast<RMatrix*>(this), i);
   }
   
   inline T& operator[](std::size_t i) {
      return *(data_ + i);
   }
   
   inline const T& operator[](std::size_t i) const {
      return *(data_ + i);
   }
   
private:
   T* data_;
   std::size_t nrow_;
   std::size_t ncol_;
};

} // namespace RcppParallel

#endif // __RCPP_PARALLEL_RMATRIX__


================================================
FILE: inst/include/RcppParallel/RVector.h
================================================
#ifndef __RCPP_PARALLEL_RVECTOR__
#define __RCPP_PARALLEL_RVECTOR__

#include <cstddef>

namespace RcppParallel {

template <typename T>
class RVector {

public:   
   typedef T* iterator;
   typedef const T* const_iterator;

   template <typename Source>
   inline explicit RVector(const Source& source) 
      : begin_(const_cast<Source&>(source).begin()),
        end_(begin_ + source.length())

   {
   }

   inline RVector(std::size_t begin, std::size_t end) 
      : begin_(begin), end_(end)
   {   
   }
   
   inline RVector(const RVector& other) 
      : begin_(other.begin_), end_(other.end_)
   {   
   }
   
   inline RVector& operator=(const RVector& rhs) {
      begin_ = rhs.begin_;
      end_ = rhs.end_;
      return *this;
   }
   
   inline iterator begin() { return begin_; }
   inline iterator end() { return end_; }
   
   inline const_iterator begin() const { return begin_; }
   inline const_iterator end() const { return end_; }
   
   inline std::size_t size() const { return end_ - begin_; }
   inline std::size_t length() const { return end_ - begin_; }
   
   inline T& operator[](std::size_t i) {
     return *(begin_ + i);
   }
   
   inline const T& operator[](std::size_t i) const {
     return *(begin_ + i);
   }
   
private:
   T* begin_;
   T* end_;  
};

} // namespace RcppParallel

#endif // __RCPP_PARALLEL_RVECTOR__


================================================
FILE: inst/include/RcppParallel/TBB.h
================================================
#ifndef __RCPP_PARALLEL_TBB__
#define __RCPP_PARALLEL_TBB__

#include "Common.h"

#ifndef TBB_PREVIEW_GLOBAL_CONTROL
# define TBB_PREVIEW_GLOBAL_CONTROL 1
#endif

// For compatibility with existing packages on CRAN.
#include "tbb/blocked_range.h"
#include "tbb/concurrent_unordered_set.h"
#include "tbb/concurrent_unordered_map.h"
#include "tbb/global_control.h"
#include "tbb/mutex.h"
#include "tbb/parallel_for.h"
#include "tbb/parallel_for_each.h"
#include "tbb/parallel_reduce.h"
#include "tbb/parallel_sort.h"
#include "tbb/spin_mutex.h"

// For compatibility with older R packages.
namespace tbb {

#ifndef __TBB_task_scheduler_init_H
#define __TBB_task_scheduler_init_H

class task_scheduler_init {
   
public:
   task_scheduler_init(
      int number_of_threads = -1,
      std::size_t stack_size = 0)
   {
   }
   
   static int default_num_threads()
   {
      return 2;
   }
   
   static const int automatic = -1;
   static const int deferred = -2;
 
};

#endif

} // end namespace tbb


namespace RcppParallel {

// This class is primarily used to implement type erasure. The goals here were:
//
// 1. Hide the tbb symbols / implementation details from client R packages.
//    That is, they should get the tools they need only via RcppParallel.
//
// 2. Do this in a way that preserves binary compatibility with pre-existing
//    classes that make use of parallelReduce().
//
// 3. Ensure that those packages, when re-compiled without source changes,
//    can still function as expected.
//
// The downside here is that all the indirection through std::function<>
// and the requirement for RTTI is probably expensive, but I couldn't find
// a better way forward that could also preserve binary compatibility with
// existing pre-built pacakges.
//
// Hopefully, in a future release, we can do away with this wrapper, once
// packages have been rebuilt and no longer implicitly depend on TBB internals.
struct ReducerWrapper {

   template <typename T>
   ReducerWrapper(T* reducer)
   {
      self_ = reinterpret_cast<void*>(reducer);
      owned_ = false;

      work_ = [&](void* self, std::size_t begin, std::size_t end)
      {
         (*reinterpret_cast<T*>(self))(begin, end);
      };

      split_ = [&](void* object, Split split)
      {
         return new T(*reinterpret_cast<T*>(object), split);
      };

      join_ = [&](void* self, void* other)
      {
         (*reinterpret_cast<T*>(self)).join(*reinterpret_cast<T*>(other));
      };

      deleter_ = [&](void* object)
      {
         delete (T*) object;
      };
   }

   ~ReducerWrapper()
   {
      if (owned_)
      {
         deleter_(self_);
         self_ = nullptr;
      }
   }

   void operator()(std::size_t begin, std::size_t end) const
   {
      work_(self_, begin, end);
   }

   ReducerWrapper(const ReducerWrapper& rhs, Split split)
   {
      self_  = rhs.split_(rhs.self_, split);
      owned_ = true;

      work_    = rhs.work_;
      split_   = rhs.split_;
      join_    = rhs.join_;
      deleter_ = rhs.deleter_;
   }

   void join(const ReducerWrapper& rhs) const
   {
      join_(self_, rhs.self_);
   }

private:
   void* self_ = nullptr;
   bool owned_ = false;

   std::function<void (void*, std::size_t, std::size_t)> work_;
   std::function<void*(void*, Split)> split_;
   std::function<void (void*, void*)> join_;
   std::function<void(void*)> deleter_;
};

void tbbParallelFor(std::size_t begin,
                    std::size_t end,
                    Worker& worker,
                    std::size_t grainSize = 1,
                    int numThreads = -1);

void tbbParallelReduceImpl(std::size_t begin,
                           std::size_t end,
                           ReducerWrapper& wrapper,
                           std::size_t grainSize = 1,
                           int numThreads = -1);

template <typename Reducer>
void tbbParallelReduce(std::size_t begin,
                       std::size_t end,
                       Reducer& reducer,
                       std::size_t grainSize = 1,
                       int numThreads = -1)
{
   ReducerWrapper wrapper(&reducer);
   tbbParallelReduceImpl(begin, end, wrapper, grainSize, numThreads);
}

} // namespace RcppParallel

#endif // __RCPP_PARALLEL_TBB__


================================================
FILE: inst/include/RcppParallel/Timer.h
================================================
#ifndef __RCPP_PARALLEL_TIMER__
#define __RCPP_PARALLEL_TIMER__

namespace RcppParallel {
    typedef uint64_t nanotime_t;

    template <typename Timer>
    class ProportionTimer {
    public:
        ProportionTimer() : 
            timer(), n(0), id(0)
        {}
        
        ProportionTimer( nanotime_t origin, int id_ ) : 
            timer(origin), n(0), id(id_)
        {}
        
        inline operator SEXP() const {
            Rcpp::NumericVector out = (SEXP)timer ;
            out.attr("n") = n ;
            return out ;
        }
        
        inline nanotime_t origin() const{
            return timer.origin() ;
        }
        
        inline int get_n() const {
            return n ;    
        }
        
        inline void step( const std::string& name) {
            timer.step(name) ;    
        }
        
        Timer timer ;
        int n ;
        int id ;
        
    } ;
    
    template <typename Timer>
    class SingleTimer {
    public:
        SingleTimer() : timer(){}
        
        inline operator SEXP(){
            Rcpp::List out = Rcpp::List::create(timer) ;
            out.attr("class") = Rcpp::CharacterVector::create( "SingleTimer", "Timer" );
            return out ;
        }
        
        inline void step( const char* name ){
            timer.step(name) ;    
        }
        
    private:
        Timer timer ;
    } ;
    
    template <typename Timer>
    class FixedSizeTimers {
    public:
        FixedSizeTimers( int n, int ndata_ ) : 
            timers(n), ndata(ndata_)
        {}
        
        inline ProportionTimer<Timer>& get(int i) {
            return timers[i] ;
        }
        
        inline ProportionTimer<Timer>& operator[](int i){ 
            return timers[i]; 
        }
        
        inline operator SEXP(){
            Rcpp::List out = wrap(timers) ;
            out.attr("class") = Rcpp::CharacterVector::create("FixedSizeTimers", "Timer") ;
            out.attr("n") = ndata ;
            return out ;
        }
        
    private:
        std::vector< ProportionTimer<Timer> > timers ;
        int ndata ;
    } ;
    
    template <typename Timer, typename Mutex, typename Locker>
    class TimersList {
    public:
        
        TimersList(int n_): 
            timers(), origin(Rcpp::get_nanotime()), n(n_)
        {
            timers.push_back( ProportionTimer<Timer>( origin, 0 ) ) ;
            childs.push_back( std::vector<int>() );
        }
        
        ProportionTimer<Timer>& front(){
            return timers.front() ;
        }
        
        ProportionTimer<Timer>& get_new_timer(int parent_id){
            Locker lock(mutex) ;
            int id = timers.size() ;
            timers.push_back( ProportionTimer<Timer>( origin, id ) ) ;
            childs.push_back( std::vector<int>() );
            std::list< std::vector<int> >::iterator it = childs.begin() ;
            for(int i=0; i<parent_id; i++) ++it ;
            it->push_back(id) ;
            return timers.back() ;
        }
        
        inline operator SEXP(){
            int nt = timers.size() ;
            Rcpp::List data(nt) ;
            typename std::list<ProportionTimer<Timer> >::const_iterator timers_it = timers.begin() ;
            std::list<std::vector<int> >::const_iterator childs_it = childs.begin() ;
            for( int i=0; i<nt; i++, ++timers_it, ++childs_it ){
                Rcpp::NumericVector x = (SEXP)*timers_it ;
                Rcpp::IntegerVector kids = Rcpp::wrap(*childs_it) ;
                x.attr("childs") = kids + 1 ;
                data[i] = x ;
            }
            data.attr("class") = Rcpp::CharacterVector::create( "TimersList" , "Timer" ) ;
            data.attr("n") = n ;
            return data ;
        }
        
        std::list< ProportionTimer<Timer> > timers ;
        std::list< std::vector<int> > childs ;
        Mutex mutex ;
        nanotime_t origin ;
        int n ;
        
    private:
        TimersList( const TimersList& ) ;
    
    } ;
    
    template <typename Reducer, typename Timer, typename Mutex, typename Locker, typename OUT = Rcpp::List>
    class TimedReducer : public Worker {
    public:
        typedef TimersList<Timer,Mutex,Locker> Timers ; 
        
        Reducer* reducer ;
        Timers& timers ;
        ProportionTimer<Timer>& timer ;
        bool owner ;
        
        TimedReducer( Reducer& reducer_, Timers& timers_) : 
            reducer(&reducer_), 
            timers(timers_), 
            timer(timers.get_new_timer(0)), 
            owner(false)
        {
            timer.step("init");
        }
        
        TimedReducer( const TimedReducer& other, Split s) : 
            reducer( new Reducer(*other.reducer, s) ), 
            timers( other.timers ), 
            timer( timers.get_new_timer(other.timer.id) ),
            owner(true)
        {
            timer.step("init") ;
        }
        
        ~TimedReducer(){
            if(owner && reducer) {
                delete reducer ;
            }
            reducer = 0 ;
        }
        
        inline void operator()( size_t begin, size_t end){
            timer.n += (end-begin) ;
            timer.step("start") ;
            reducer->operator()(begin, end) ;
            timer.step("work") ;
        }
        
        inline void join(const TimedReducer& rhs){
            rhs.timer.step("start") ;
            reducer->join(*rhs.reducer) ;
            rhs.timer.step("join") ;
        }
        
        inline Rcpp::List get() const {
            timers.front().step("start") ;
            OUT out = reducer->get() ;
            timers.front().step("structure") ;
            
            Rcpp::List res = Rcpp::List::create( (SEXP)timers, out );
            return res ;
        }
        
    private:
        // just to be on the safe side, making sure these are not called
        TimedReducer() ;
        TimedReducer( const TimedReducer& ) ;
    } ;
    
    
} // namespace RcppParallel


#endif // __RCPP_PARALLEL_COMMON__


================================================
FILE: inst/include/RcppParallel/TinyThread.h
================================================
#ifndef __RCPP_PARALLEL_TINYTHREAD__
#define __RCPP_PARALLEL_TINYTHREAD__

#include <cstdlib>
#include <cstdio>

#include "Common.h"

#include <tthread/tinythread.h>


#include <vector>

namespace RcppParallel {

namespace {

// Class which represents a range of indexes to perform work on
// (worker functions are passed this range so they know which
// elements are safe to read/write to)
class IndexRange {
public:

   // Initizlize with a begin and (exclusive) end index
   IndexRange(std::size_t begin, std::size_t end)
    : begin_(begin), end_(end)
   {
   }
  
   // Access begin() and end()
   std::size_t begin() const { return begin_; }
   std::size_t end() const { return end_; }
   std::size_t size() const { return end_ - begin_ ; }
   
private:
   std::size_t begin_;
   std::size_t end_;
};


// Because tinythread allows us to pass only a plain C function
// we need to pass our worker and range within a struct that we 
// can cast to/from void*
struct Work {
   Work(IndexRange range, Worker& worker) 
    :  range(range), worker(worker)
   {
   }
   IndexRange range;
   Worker& worker;
};

// Thread which performs work (then deletes the work object
// when it's done)
extern "C" inline void workerThread(void* data) {
   try
   {
      Work* pWork = static_cast<Work*>(data);
      pWork->worker(pWork->range.begin(), pWork->range.end());
      delete pWork;
   }
   catch(...)
   {
   }
}

// Function to calculate the ranges for a given input
std::vector<IndexRange> splitInputRange(const IndexRange& range,
                                        std::size_t grainSize) {
  
   // determine max number of threads
   std::size_t threads = tthread::thread::hardware_concurrency();
   char* numThreads = ::getenv("RCPP_PARALLEL_NUM_THREADS");
   if (numThreads != NULL) {
      int parsedThreads = ::atoi(numThreads);
      if (parsedThreads > 0)
         threads = parsedThreads;
   }
       
   // compute grainSize (including enforcing requested minimum)
   std::size_t length = range.end() - range.begin();
   if (threads == 1)
      grainSize = length;
   else if ((length % threads) == 0) // perfect division
      grainSize = std::max(length / threads, grainSize);
   else // imperfect division, divide by threads - 1
      grainSize = std::max(length / (threads-1), grainSize);
  
   // allocate ranges
   std::vector<IndexRange> ranges;
   std::size_t begin = range.begin();
   std::size_t end = begin;
   while (begin < range.end()) {
     if ((range.end() - (begin + grainSize)) < grainSize)
       end = range.end();
     else
       end = std::min(begin + grainSize, range.end());

     ranges.push_back(IndexRange(begin, end));
     begin = end;
   }
   
   // return ranges  
   return ranges;
}

} // anonymous namespace

// Execute the Worker over the IndexRange in parallel
inline void ttParallelFor(std::size_t begin,
                          std::size_t end, 
                          Worker& worker,
                          std::size_t grainSize = 1)
{
   // split the work
   IndexRange inputRange(begin, end);
   std::vector<IndexRange> ranges = splitInputRange(inputRange, grainSize);
   
   // create threads
   std::vector<tthread::thread*> threads;
   for (std::size_t i = 0; i<ranges.size(); ++i) {
      threads.push_back(new tthread::thread(workerThread, new Work(ranges[i], worker)));
   }
   
   // join and delete them
   for (std::size_t i = 0; i<threads.size(); ++i) {
      threads[i]->join();
      delete threads[i];
   }
}

// Execute the IWorker over the range in parallel then join results
template <typename Reducer>
inline void ttParallelReduce(std::size_t begin,
                             std::size_t end, 
                             Reducer& reducer,
                             std::size_t grainSize = 1)
{
   // split the work
   IndexRange inputRange(begin, end);
   std::vector<IndexRange> ranges = splitInputRange(inputRange, grainSize);
   
   // create threads (split for each thread and track the allocated workers)
   std::vector<tthread::thread*> threads;
   std::vector<Worker*> workers;
   for (std::size_t i = 0; i<ranges.size(); ++i) {
      Reducer* pReducer = new Reducer(reducer, RcppParallel::Split());
      workers.push_back(pReducer);
      threads.push_back(new tthread::thread(workerThread, new Work(ranges[i], *pReducer)));
   }
   
   // wait for each thread, join it's results, then delete the worker & thread
   for (std::size_t i = 0; i<threads.size(); ++i) {
      // wait for thread
      threads[i]->join();
      
      // join the results
      reducer.join(static_cast<Reducer&>(*workers[i]));
      
      // delete the worker (which we split above) and the thread
      delete workers[i];
      delete threads[i];
   }
}

} // namespace RcppParallel

#endif // __RCPP_PARALLEL_TINYTHREAD__


================================================
FILE: inst/include/RcppParallel.h
================================================

#ifndef __RCPP_PARALLEL__
#define __RCPP_PARALLEL__

// TinyThread implementation
#include "RcppParallel/TinyThread.h"

// Use TBB only where it's known to compile and work correctly
// (NOTE: Windows TBB is temporarily opt-in for packages for
// compatibility with CRAN packages not previously configured
// to link to TBB in Makevars.win)
#ifndef RCPP_PARALLEL_USE_TBB
# if defined(__APPLE__) || defined(__gnu_linux__) || (defined(__sun) && defined(__SVR4) && !defined(__sparc))
#  define RCPP_PARALLEL_USE_TBB 1
# else
#  define RCPP_PARALLEL_USE_TBB 0
# endif
#endif

#if RCPP_PARALLEL_USE_TBB
# include "RcppParallel/TBB.h"
#endif

#include "RcppParallel/Backend.h"
#include "RcppParallel/RVector.h"
#include "RcppParallel/RMatrix.h"

namespace RcppParallel {

inline void parallelFor(std::size_t begin,
                        std::size_t end,
                        Worker& worker,
                        std::size_t grainSize = 1,
                        int numThreads = -1)
{
   grainSize = resolveValue("RCPP_PARALLEL_GRAIN_SIZE", grainSize, std::size_t(1));
   numThreads = resolveValue("RCPP_PARALLEL_NUM_THREADS", numThreads, -1);

#if RCPP_PARALLEL_USE_TBB
   if (internal::backend() == internal::BACKEND_TBB)
      tbbParallelFor(begin, end, worker, grainSize, numThreads);
   else
      ttParallelFor(begin, end, worker, grainSize);
#else
   ttParallelFor(begin, end, worker, grainSize);
#endif
}

template <typename Reducer>
inline void parallelReduce(std::size_t begin,
                           std::size_t end,
                           Reducer& reducer,
                           std::size_t grainSize = 1,
                           int numThreads = -1)
{
   grainSize = resolveValue("RCPP_PARALLEL_GRAIN_SIZE", grainSize, std::size_t(1));
   numThreads = resolveValue("RCPP_PARALLEL_NUM_THREADS", numThreads, -1);

#if RCPP_PARALLEL_USE_TBB
   if (internal::backend() == internal::BACKEND_TBB)
      tbbParallelReduce(begin, end, reducer, grainSize, numThreads);
   else
      ttParallelReduce(begin, end, reducer, grainSize);
#else
   ttParallelReduce(begin, end, reducer, grainSize);
#endif
}

} // end namespace RcppParallel

// TRUE and FALSE macros that may come with system headers on some systems
// But conflict with R.h (R_ext/Boolean.h)
// TRUE and FALSE macros should be undef in RcppParallel.h
#ifdef TRUE
  #undef TRUE
#endif
#ifdef FALSE
  #undef FALSE
#endif

#endif // __RCPP_PARALLEL__


================================================
FILE: inst/include/tthread/fast_mutex.h
================================================
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
Copyright (c) 2010-2012 Marcus Geelnard

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source
    distribution.
*/

#ifndef _FAST_MUTEX_H_
#define _FAST_MUTEX_H_

/// @file

// Which platform are we on?
#if !defined(_TTHREAD_PLATFORM_DEFINED_)
  #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
    #define _TTHREAD_WIN32_
  #else
    #define _TTHREAD_POSIX_
  #endif
  #define _TTHREAD_PLATFORM_DEFINED_
#endif

// Check if we can support the assembly language level implementation (otherwise
// revert to the system API)
#if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || \
    (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || \
    (defined(__GNUC__) && (defined(__ppc__)))
  #define _FAST_MUTEX_ASM_
#else
  #define _FAST_MUTEX_SYS_
#endif

#if defined(_TTHREAD_WIN32_)
  #ifndef WIN32_LEAN_AND_MEAN
    #define WIN32_LEAN_AND_MEAN
    #define __UNDEF_LEAN_AND_MEAN
  #endif
  #include <windows.h>
  #ifdef __UNDEF_LEAN_AND_MEAN
    #undef WIN32_LEAN_AND_MEAN
    #undef __UNDEF_LEAN_AND_MEAN
  #endif
#else
  #ifdef _FAST_MUTEX_ASM_
    #include <sched.h>
  #else
    #include <pthread.h>
  #endif
#endif

namespace tthread {

/// Fast mutex class.
/// This is a mutual exclusion object for synchronizing access to shared
/// memory areas for several threads. It is similar to the tthread::mutex class,
/// but instead of using system level functions, it is implemented as an atomic
/// spin lock with very low CPU overhead.
///
/// The \c fast_mutex class is NOT compatible with the \c condition_variable
/// class (however, it IS compatible with the \c lock_guard class). It should
/// also be noted that the \c fast_mutex class typically does not provide
/// as accurate thread scheduling as a the standard \c mutex class does.
///
/// Because of the limitations of the class, it should only be used in
/// situations where the mutex needs to be locked/unlocked very frequently.
///
/// @note The "fast" version of this class relies on inline assembler language,
/// which is currently only supported for 32/64-bit Intel x86/AMD64 and
/// PowerPC architectures on a limited number of compilers (GNU g++ and MS
/// Visual C++).
/// For other architectures/compilers, system functions are used instead.
class fast_mutex {
  public:
    /// Constructor.
#if defined(_FAST_MUTEX_ASM_)
    fast_mutex() : mLock(0) {}
#else
    fast_mutex()
    {
  #if defined(_TTHREAD_WIN32_)
      InitializeCriticalSection(&mHandle);
  #elif defined(_TTHREAD_POSIX_)
      pthread_mutex_init(&mHandle, NULL);
  #endif
    }
#endif

#if !defined(_FAST_MUTEX_ASM_)
    /// Destructor.
    ~fast_mutex()
    {
  #if defined(_TTHREAD_WIN32_)
      DeleteCriticalSection(&mHandle);
  #elif defined(_TTHREAD_POSIX_)
      pthread_mutex_destroy(&mHandle);
  #endif
    }
#endif

    /// Lock the mutex.
    /// The method will block the calling thread until a lock on the mutex can
    /// be obtained. The mutex remains locked until \c unlock() is called.
    /// @see lock_guard
    inline void lock()
    {
#if defined(_FAST_MUTEX_ASM_)
      bool gotLock;
      do {
        gotLock = try_lock();
        if(!gotLock)
        {
  #if defined(_TTHREAD_WIN32_)
          Sleep(0);
  #elif defined(_TTHREAD_POSIX_)
          sched_yield();
  #endif
        }
      } while(!gotLock);
#else
  #if defined(_TTHREAD_WIN32_)
      EnterCriticalSection(&mHandle);
  #elif defined(_TTHREAD_POSIX_)
      pthread_mutex_lock(&mHandle);
  #endif
#endif
    }

    /// Try to lock the mutex.
    /// The method will try to lock the mutex. If it fails, the function will
    /// return immediately (non-blocking).
    /// @return \c true if the lock was acquired, or \c false if the lock could
    /// not be acquired.
    inline bool try_lock()
    {
#if defined(_FAST_MUTEX_ASM_)
      int oldLock;
  #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
      asm volatile (
        "movl $1,%%eax\n\t"
        "xchg %%eax,%0\n\t"
        "movl %%eax,%1\n\t"
        : "=m" (mLock), "=m" (oldLock)
        :
        : "%eax", "memory"
      );
  #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
      int *ptrLock = &mLock;
      __asm {
        mov eax,1
        mov ecx,ptrLock
        xchg eax,[ecx]
        mov oldLock,eax
      }
  #elif defined(__GNUC__) && (defined(__ppc__))
      int newLock = 1;
      asm volatile (
        "\n1:\n\t"
        "lwarx  %0,0,%1\n\t"
        "cmpwi  0,%0,0\n\t"
        "bne-   2f\n\t"
        "stwcx. %2,0,%1\n\t"
        "bne-   1b\n\t"
        "isync\n"
        "2:\n\t"
        : "=&r" (oldLock)
        : "r" (&mLock), "r" (newLock)
        : "cr0", "memory"
      );
  #endif
      return (oldLock == 0);
#else
  #if defined(_TTHREAD_WIN32_)
      return TryEnterCriticalSection(&mHandle) ? true : false;
  #elif defined(_TTHREAD_POSIX_)
      return (pthread_mutex_trylock(&mHandle) == 0) ? true : false;
  #endif
#endif
    }

    /// Unlock the mutex.
    /// If any threads are waiting for the lock on this mutex, one of them will
    /// be unblocked.
    inline void unlock()
    {
#if defined(_FAST_MUTEX_ASM_)
  #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
      asm volatile (
        "movl $0,%%eax\n\t"
        "xchg %%eax,%0\n\t"
        : "=m" (mLock)
        :
        : "%eax", "memory"
      );
  #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
      int *ptrLock = &mLock;
      __asm {
        mov eax,0
        mov ecx,ptrLock
        xchg eax,[ecx]
      }
  #elif defined(__GNUC__) && (defined(__ppc__))
      asm volatile (
        "sync\n\t"  // Replace with lwsync where possible?
        : : : "memory"
      );
      mLock = 0;
  #endif
#else
  #if defined(_TTHREAD_WIN32_)
      LeaveCriticalSection(&mHandle);
  #elif defined(_TTHREAD_POSIX_)
      pthread_mutex_unlock(&mHandle);
  #endif
#endif
    }

  private:
#if defined(_FAST_MUTEX_ASM_)
    int mLock;
#else
  #if defined(_TTHREAD_WIN32_)
    CRITICAL_SECTION mHandle;
  #elif defined(_TTHREAD_POSIX_)
    pthread_mutex_t mHandle;
  #endif
#endif
};

}

#endif // _FAST_MUTEX_H_



================================================
FILE: inst/include/tthread/tinythread.h
================================================
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
Copyright (c) 2010-2012 Marcus Geelnard

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source
    distribution.
*/

#ifndef _TINYTHREAD_H_
#define _TINYTHREAD_H_

/// @file
/// @mainpage TinyThread++ API Reference
///
/// @section intro_sec Introduction
/// TinyThread++ is a minimal, portable implementation of basic threading
/// classes for C++.
///
/// They closely mimic the functionality and naming of the C++11 standard, and
/// should be easily replaceable with the corresponding std:: variants.
///
/// @section port_sec Portability
/// The Win32 variant uses the native Win32 API for implementing the thread
/// classes, while for other systems, the POSIX threads API (pthread) is used.
///
/// @section class_sec Classes
/// In order to mimic the threading API of the C++11 standard, subsets of
/// several classes are provided. The fundamental classes are:
/// @li tthread::thread
/// @li tthread::mutex
/// @li tthread::recursive_mutex
/// @li tthread::condition_variable
/// @li tthread::lock_guard
/// @li tthread::fast_mutex
///
/// @section misc_sec Miscellaneous
/// The following special keywords are available: #thread_local.
///
/// For more detailed information (including additional classes), browse the
/// different sections of this documentation. A good place to start is:
/// tinythread.h.

// Which platform are we on?
#if !defined(_TTHREAD_PLATFORM_DEFINED_)
  #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
    #define _TTHREAD_WIN32_
  #else
    #define _TTHREAD_POSIX_
  #endif
  #define _TTHREAD_PLATFORM_DEFINED_
#endif

// Platform specific includes
#if defined(_TTHREAD_WIN32_)
  #ifndef WIN32_LEAN_AND_MEAN
    #define WIN32_LEAN_AND_MEAN
    #define __UNDEF_LEAN_AND_MEAN
  #endif
  #include <windows.h>
  #ifdef __UNDEF_LEAN_AND_MEAN
    #undef WIN32_LEAN_AND_MEAN
    #undef __UNDEF_LEAN_AND_MEAN
  #endif
#else
  #include <pthread.h>
  #include <signal.h>
  #include <sched.h>
  #include <unistd.h>
  #include <stdlib.h> 
#endif

// Generic includes
#include <ostream>

/// TinyThread++ version (major number).
#define TINYTHREAD_VERSION_MAJOR 1
/// TinyThread++ version (minor number).
#define TINYTHREAD_VERSION_MINOR 1
/// TinyThread++ version (full version).
#define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)

// Do we have a fully featured C++11 compiler?
#if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L))
  #define _TTHREAD_CPP11_
#endif

// ...at least partial C++11?
#if defined(_TTHREAD_CPP11_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
  #define _TTHREAD_CPP11_PARTIAL_
#endif

// Macro for disabling assignments of objects.
#ifdef _TTHREAD_CPP11_PARTIAL_
  #define _TTHREAD_DISABLE_ASSIGNMENT(name) \
      name(const name&) = delete; \
      name& operator=(const name&) = delete;
#else
  #define _TTHREAD_DISABLE_ASSIGNMENT(name) \
      name(const name&); \
      name& operator=(const name&);
#endif

/// @def thread_local
/// Thread local storage keyword.
/// A variable that is declared with the @c thread_local keyword makes the
/// value of the variable local to each thread (known as thread-local storage,
/// or TLS). Example usage:
/// @code
/// // This variable is local to each thread.
/// thread_local int variable;
/// @endcode
/// @note The @c thread_local keyword is a macro that maps to the corresponding
/// compiler directive (e.g. @c __declspec(thread)). While the C++11 standard
/// allows for non-trivial types (e.g. classes with constructors and
/// destructors) to be declared with the @c thread_local keyword, most pre-C++11
/// compilers only allow for trivial types (e.g. @c int). So, to guarantee
/// portable code, only use trivial types for thread local storage.
/// @note This directive is currently not supported on Mac macOS (it will give
/// a compiler error), since compile-time TLS is not supported in the Mac macOS
/// executable format. Also, some older versions of MinGW (before GCC 4.x) do
/// not support this directive.
/// @hideinitializer

#if !defined(_TTHREAD_CPP11_) && !defined(thread_local)
 #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
  #define thread_local __thread
 #else
  #define thread_local __declspec(thread)
 #endif
#endif


/// Main name space for TinyThread++.
/// This namespace is more or less equivalent to the @c std namespace for the
/// C++11 thread classes. For instance, the tthread::mutex class corresponds to
/// the std::mutex class.
namespace tthread {

/// Mutex class.
/// This is a mutual exclusion object for synchronizing access to shared
/// memory areas for several threads. The mutex is non-recursive (i.e. a
/// program may deadlock if the thread that owns a mutex object calls lock()
/// on that object).
/// @see recursive_mutex
class mutex {
  public:
    /// Constructor.
    mutex()
#if defined(_TTHREAD_WIN32_)
      : mAlreadyLocked(false)
#endif
    {
#if defined(_TTHREAD_WIN32_)
      InitializeCriticalSection(&mHandle);
#else
      pthread_mutex_init(&mHandle, NULL);
#endif
    }

    /// Destructor.
    ~mutex()
    {
#if defined(_TTHREAD_WIN32_)
      DeleteCriticalSection(&mHandle);
#else
      pthread_mutex_destroy(&mHandle);
#endif
    }

    /// Lock the mutex.
    /// The method will block the calling thread until a lock on the mutex can
    /// be obtained. The mutex remains locked until @c unlock() is called.
    /// @see lock_guard
    inline void lock()
    {
#if defined(_TTHREAD_WIN32_)
      EnterCriticalSection(&mHandle);
      while(mAlreadyLocked) Sleep(1000); // Simulate deadlock...
      mAlreadyLocked = true;
#else
      pthread_mutex_lock(&mHandle);
#endif
    }

    /// Try to lock the mutex.
    /// The method will try to lock the mutex. If it fails, the function will
    /// return immediately (non-blocking).
    /// @return @c true if the lock was acquired, or @c false if the lock could
    /// not be acquired.
    inline bool try_lock()
    {
#if defined(_TTHREAD_WIN32_)
      bool ret = (TryEnterCriticalSection(&mHandle) ? true : false);
      if(ret && mAlreadyLocked)
      {
        LeaveCriticalSection(&mHandle);
        ret = false;
      }
      return ret;
#else
      return (pthread_mutex_trylock(&mHandle) == 0) ? true : false;
#endif
    }

    /// Unlock the mutex.
    /// If any threads are waiting for the lock on this mutex, one of them will
    /// be unblocked.
    inline void unlock()
    {
#if defined(_TTHREAD_WIN32_)
      mAlreadyLocked = false;
      LeaveCriticalSection(&mHandle);
#else
      pthread_mutex_unlock(&mHandle);
#endif
    }

    _TTHREAD_DISABLE_ASSIGNMENT(mutex)

  private:
#if defined(_TTHREAD_WIN32_)
    CRITICAL_SECTION mHandle;
    bool mAlreadyLocked;
#else
    pthread_mutex_t mHandle;
#endif

    friend class condition_variable;
};

/// Recursive mutex class.
/// This is a mutual exclusion object for synchronizing access to shared
/// memory areas for several threads. The mutex is recursive (i.e. a thread
/// may lock the mutex several times, as long as it unlocks the mutex the same
/// number of times).
/// @see mutex
class recursive_mutex {
  public:
    /// Constructor.
    recursive_mutex()
    {
#if defined(_TTHREAD_WIN32_)
      InitializeCriticalSection(&mHandle);
#else
      pthread_mutexattr_t attr;
      pthread_mutexattr_init(&attr);
      pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
      pthread_mutex_init(&mHandle, &attr);
#endif
    }

    /// Destructor.
    ~recursive_mutex()
    {
#if defined(_TTHREAD_WIN32_)
      DeleteCriticalSection(&mHandle);
#else
      pthread_mutex_destroy(&mHandle);
#endif
    }

    /// Lock the mutex.
    /// The method will block the calling thread until a lock on the mutex can
    /// be obtained. The mutex remains locked until @c unlock() is called.
    /// @see lock_guard
    inline void lock()
    {
#if defined(_TTHREAD_WIN32_)
      EnterCriticalSection(&mHandle);
#else
      pthread_mutex_lock(&mHandle);
#endif
    }

    /// Try to lock the mutex.
    /// The method will try to lock the mutex. If it fails, the function will
    /// return immediately (non-blocking).
    /// @return @c true if the lock was acquired, or @c false if the lock could
    /// not be acquired.
    inline bool try_lock()
    {
#if defined(_TTHREAD_WIN32_)
      return TryEnterCriticalSection(&mHandle) ? true : false;
#else
      return (pthread_mutex_trylock(&mHandle) == 0) ? true : false;
#endif
    }

    /// Unlock the mutex.
    /// If any threads are waiting for the lock on this mutex, one of them will
    /// be unblocked.
    inline void unlock()
    {
#if defined(_TTHREAD_WIN32_)
      LeaveCriticalSection(&mHandle);
#else
      pthread_mutex_unlock(&mHandle);
#endif
    }

    _TTHREAD_DISABLE_ASSIGNMENT(recursive_mutex)

  private:
#if defined(_TTHREAD_WIN32_)
    CRITICAL_SECTION mHandle;
#else
    pthread_mutex_t mHandle;
#endif

    friend class condition_variable;
};

/// Lock guard class.
/// The constructor locks the mutex, and the destructor unlocks the mutex, so
/// the mutex will automatically be unlocked when the lock guard goes out of
/// scope. Example usage:
/// @code
/// mutex m;
/// int counter;
///
/// void increment()
/// {
///   lock_guard<mutex> guard(m);
///   ++ counter;
/// }
/// @endcode

template <class T>
class lock_guard {
  public:
    typedef T mutex_type;

    lock_guard() : mMutex(0) {}

    /// The constructor locks the mutex.
    explicit lock_guard(mutex_type &aMutex)
    {
      mMutex = &aMutex;
      mMutex->lock();
    }

    /// The destructor unlocks the mutex.
    ~lock_guard()
    {
      if(mMutex)
        mMutex->unlock();
    }

  private:
    mutex_type * mMutex;
};

/// Condition variable class.
/// This is a signalling object for synchronizing the execution flow for
/// several threads. Example usage:
/// @code
/// // Shared data and associated mutex and condition variable objects
/// int count;
/// mutex m;
/// condition_variable cond;
///
/// // Wait for the counter to reach a certain number
/// void wait_counter(int targetCount)
/// {
///   lock_guard<mutex> guard(m);
///   while(count < targetCount)
///     cond.wait(m);
/// }
///
/// // Increment the counter, and notify waiting threads
/// void increment()
/// {
///   lock_guard<mutex> guard(m);
///   ++ count;
///   cond.notify_all();
/// }
/// @endcode
class condition_variable {
  public:
    /// Constructor.
#if defined(_TTHREAD_WIN32_)
    condition_variable();
#else
    condition_variable()
    {
      pthread_cond_init(&mHandle, NULL);
    }
#endif

    /// Destructor.
#if defined(_TTHREAD_WIN32_)
    ~condition_variable();
#else
    ~condition_variable()
    {
      pthread_cond_destroy(&mHandle);
    }
#endif

    /// Wait for the condition.
    /// The function will block the calling thread until the condition variable
    /// is woken by @c notify_one(), @c notify_all() or a spurious wake up.
    /// @param[in] aMutex A mutex that will be unlocked when the wait operation
    ///   starts, an locked again as soon as the wait operation is finished.
    template <class _mutexT>
    inline void wait(_mutexT &aMutex)
    {
#if defined(_TTHREAD_WIN32_)
      // Increment number of waiters
      EnterCriticalSection(&mWaitersCountLock);
      ++ mWaitersCount;
      LeaveCriticalSection(&mWaitersCountLock);

      // Release the mutex while waiting for the condition (will decrease
      // the number of waiters when done)...
      aMutex.unlock();
      _wait();
      aMutex.lock();
#else
      pthread_cond_wait(&mHandle, &aMutex.mHandle);
#endif
    }

    /// Notify one thread that is waiting for the condition.
    /// If at least one thread is blocked waiting for this condition variable,
    /// one will be woken up.
    /// @note Only threads that started waiting prior to this call will be
    /// woken up.
#if defined(_TTHREAD_WIN32_)
    void notify_one();
#else
    inline void notify_one()
    {
      pthread_cond_signal(&mHandle);
    }
#endif

    /// Notify all threads that are waiting for the condition.
    /// All threads that are blocked waiting for this condition variable will
    /// be woken up.
    /// @note Only threads that started waiting prior to this call will be
    /// woken up.
#if defined(_TTHREAD_WIN32_)
    void notify_all();
#else
    inline void notify_all()
    {
      pthread_cond_broadcast(&mHandle);
    }
#endif

    _TTHREAD_DISABLE_ASSIGNMENT(condition_variable)

  private:
#if defined(_TTHREAD_WIN32_)
    void _wait();
    HANDLE mEvents[2];                  ///< Signal and broadcast event HANDLEs.
    unsigned int mWaitersCount;         ///< Count of the number of waiters.
    CRITICAL_SECTION mWaitersCountLock; ///< Serialize access to mWaitersCount.
#else
    pthread_cond_t mHandle;
#endif
};


/// Thread class.
class thread {
  public:
#if defined(_TTHREAD_WIN32_)
    typedef HANDLE native_handle_type;
#else
    typedef pthread_t native_handle_type;
#endif

    class id;

    /// Default constructor.
    /// Construct a @c thread object without an associated thread of execution
    /// (i.e. non-joinable).
    thread() : mHandle(0), mJoinable(false)
#if defined(_TTHREAD_WIN32_)
    , mWin32ThreadID(0)
#endif
    {}

    /// Thread starting constructor.
    /// Construct a @c thread object with a new thread of execution.
    /// @param[in] aFunction A function pointer to a function of type:
    ///          <tt>void fun(void * arg)</tt>
    /// @param[in] aArg Argument to the thread function.
    /// @note This constructor is not fully compatible with the standard C++
    /// thread class. It is more similar to the pthread_create() (POSIX) and
    /// CreateThread() (Windows) functions.
    thread(void (*aFunction)(void *), void * aArg);

    /// Destructor.
    /// @note If the thread is joinable upon destruction, @c std::terminate()
    /// will be called, which terminates the process. It is always wise to do
    /// @c join() before deleting a thread object.
    ~thread();

    /// Wait for the thread to finish (join execution flows).
    /// After calling @c join(), the thread object is no longer associated with
    /// a thread of execution (i.e. it is not joinable, and you may not join
    /// with it nor detach from it).
    void join();

    /// Check if the thread is joinable.
    /// A thread object is joinable if it has an associated thread of execution.
    bool joinable() const;

    /// Detach from the thread.
    /// After calling @c detach(), the thread object is no longer assicated with
    /// a thread of execution (i.e. it is not joinable). The thread continues
    /// execution without the calling thread blocking, and when the thread
    /// ends execution, any owned resources are released.
    void detach();

    /// Return the thread ID of a thread object.
    id get_id() const;

    /// Get the native handle for this thread.
    /// @note Under Windows, this is a @c HANDLE, and under POSIX systems, this
    /// is a @c pthread_t.
    inline native_handle_type native_handle()
    {
      return mHandle;
    }

    /// Determine the number of threads which can possibly execute concurrently.
    /// This function is useful for determining the optimal number of threads to
    /// use for a task.
    /// @return The number of hardware thread contexts in the system.
    /// @note If this value is not defined, the function returns zero (0).
    static unsigned hardware_concurrency();

    _TTHREAD_DISABLE_ASSIGNMENT(thread)

  private:
    native_handle_type mHandle;   ///< Thread handle.
    mutable mutex mDataMutex;     ///< Serializer for access to the thread private data.
    bool mJoinable;               ///< Is the thread joinable?
#if defined(_TTHREAD_WIN32_)
    unsigned int mWin32ThreadID;  ///< Unique thread ID (filled out by _beginthreadex).
#endif

    // This is the internal thread wrapper function.
#if defined(_TTHREAD_WIN32_)
    static unsigned WINAPI wrapper_function(void * aArg);
#else
    static void * wrapper_function(void * aArg);
#endif
};

/// Thread ID.
/// The thread ID is a unique identifier for each thread.
/// @see thread::get_id()
class thread::id {
  public:
    /// Default constructor.
    /// The default constructed ID is that of thread without a thread of
    /// execution.
    id() : mId(0) {};

    id(unsigned long int aId) : mId(aId) {};

    id(const id& aId) : mId(aId.mId) {};

    inline id & operator=(const id &aId)
    {
      mId = aId.mId;
      return *this;
    }

    inline friend bool operator==(const id &aId1, const id &aId2)
    {
      return (aId1.mId == aId2.mId);
    }

    inline friend bool operator!=(const id &aId1, const id &aId2)
    {
      return (aId1.mId != aId2.mId);
    }

    inline friend bool operator<=(const id &aId1, const id &aId2)
    {
      return (aId1.mId <= aId2.mId);
    }

    inline friend bool operator<(const id &aId1, const id &aId2)
    {
      return (aId1.mId < aId2.mId);
    }

    inline friend bool operator>=(const id &aId1, const id &aId2)
    {
      return (aId1.mId >= aId2.mId);
    }

    inline friend bool operator>(const id &aId1, const id &aId2)
    {
      return (aId1.mId > aId2.mId);
    }

    inline friend std::ostream& operator <<(std::ostream &os, const id &obj)
    {
      os << obj.mId;
      return os;
    }

  private:
    unsigned long int mId;
};


// Related to <ratio> - minimal to be able to support chrono.
typedef long long __intmax_t;

/// Minimal implementation of the @c ratio class. This class provides enough
/// functionality to implement some basic @c chrono classes.
template <__intmax_t N, __intmax_t D = 1> class ratio {
  public:
    static double _as_double() { return double(N) / double(D); }
};

/// Minimal implementation of the @c chrono namespace.
/// The @c chrono namespace provides types for specifying time intervals.
namespace chrono {
  /// Duration template class. This class provides enough functionality to
  /// implement @c this_thread::sleep_for().
  template <class _Rep, class _Period = ratio<1> > class duration {
    private:
      _Rep rep_;
    public:
      typedef _Rep rep;
      typedef _Period period;

      /// Construct a duration object with the given duration.
      template <class _Rep2>
        explicit duration(const _Rep2& r) : rep_(r) {}

      /// Return the value of the duration object.
      rep count() const
      {
        return rep_;
      }
  };

  // Standard duration types.
  typedef duration<__intmax_t, ratio<1, 1000000000> > nanoseconds; ///< Duration with the unit nanoseconds.
  typedef duration<__intmax_t, ratio<1, 1000000> > microseconds;   ///< Duration with the unit microseconds.
  typedef duration<__intmax_t, ratio<1, 1000> > milliseconds;      ///< Duration with the unit milliseconds.
  typedef duration<__intmax_t> seconds;                            ///< Duration with the unit seconds.
  typedef duration<__intmax_t, ratio<60> > minutes;                ///< Duration with the unit minutes.
  typedef duration<__intmax_t, ratio<3600> > hours;                ///< Duration with the unit hours.
}

/// The namespace @c this_thread provides methods for dealing with the
/// calling thread.
namespace this_thread {
  /// Return the thread ID of the calling thread.
  thread::id get_id();

  /// Yield execution to another thread.
  /// Offers the operating system the opportunity to schedule another thread
  /// that is ready to run on the current processor.
  inline void yield()
  {
#if defined(_TTHREAD_WIN32_)
    Sleep(0);
#else
    sched_yield();
#endif
  }

  /// Blocks the calling thread for a period of time.
  /// @param[in] aTime Minimum time to put the thread to sleep.
  /// Example usage:
  /// @code
  /// // Sleep for 100 milliseconds
  /// this_thread::sleep_for(chrono::milliseconds(100));
  /// @endcode
  /// @note Supported duration types are: nanoseconds, microseconds,
  /// milliseconds, seconds, minutes and hours.
  template <class _Rep, class _Period> void sleep_for(const chrono::duration<_Rep, _Period>& aTime)
  {
#if defined(_TTHREAD_WIN32_)
    Sleep(int(double(aTime.count()) * (1000.0 * _Period::_as_double()) + 0.5));
#else
    usleep(int(double(aTime.count()) * (1000000.0 * _Period::_as_double()) + 0.5));
#endif
  }
}

}

// Define/macro cleanup
#undef _TTHREAD_DISABLE_ASSIGNMENT

//////////////////////////////////////////////////////////////////////////
// Inline implementation (ported from tinythread.cpp)
/////////////////////////////////////////////////////////////////////////

#include <exception>

#if defined(_TTHREAD_POSIX_)
  #include <unistd.h>
  #include <map>
#elif defined(_TTHREAD_WIN32_)
  #include <process.h>
#endif


namespace tthread {

//------------------------------------------------------------------------------
// condition_variable
//------------------------------------------------------------------------------
// NOTE 1: The Win32 implementation of the condition_variable class is based on
// the corresponding implementation in GLFW, which in turn is based on a
// description by Douglas C. Schmidt and Irfan Pyarali:
// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
//
// NOTE 2: Windows Vista actually has native support for condition variables
// (InitializeConditionVariable, WakeConditionVariable, etc), but we want to
// be portable with pre-Vista Windows versions, so TinyThread++ does not use
// Vista condition variables.
//------------------------------------------------------------------------------

#if defined(_TTHREAD_WIN32_)
  #define _CONDITION_EVENT_ONE 0
  #define _CONDITION_EVENT_ALL 1
#endif

#if defined(_TTHREAD_WIN32_)
inline condition_variable::condition_variable() : mWaitersCount(0)
{
  mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL);
  mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL);
  InitializeCriticalSection(&mWaitersCountLock);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline condition_variable::~condition_variable()
{
  CloseHandle(mEvents[_CONDITION_EVENT_ONE]);
  CloseHandle(mEvents[_CONDITION_EVENT_ALL]);
  DeleteCriticalSection(&mWaitersCountLock);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline void condition_variable::_wait()
{
  // Wait for either event to become signaled due to notify_one() or
  // notify_all() being called
  int result = WaitForMultipleObjects(2, mEvents, FALSE, INFINITE);

  // Check if we are the last waiter
  EnterCriticalSection(&mWaitersCountLock);
  -- mWaitersCount;
  bool lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) &&
                    (mWaitersCount == 0);
  LeaveCriticalSection(&mWaitersCountLock);

  // If we are the last waiter to be notified to stop waiting, reset the event
  if(lastWaiter)
    ResetEvent(mEvents[_CONDITION_EVENT_ALL]);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline void condition_variable::notify_one()
{
  // Are there any waiters?
  EnterCriticalSection(&mWaitersCountLock);
  bool haveWaiters = (mWaitersCount > 0);
  LeaveCriticalSection(&mWaitersCountLock);

  // If we have any waiting threads, send them a signal
  if(haveWaiters)
    SetEvent(mEvents[_CONDITION_EVENT_ONE]);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline void condition_variable::notify_all()
{
  // Are there any waiters?
  EnterCriticalSection(&mWaitersCountLock);
  bool haveWaiters = (mWaitersCount > 0);
  LeaveCriticalSection(&mWaitersCountLock);

  // If we have any waiting threads, send them a signal
  if(haveWaiters)
    SetEvent(mEvents[_CONDITION_EVENT_ALL]);
}
#endif


//------------------------------------------------------------------------------
// POSIX pthread_t to unique thread::id mapping logic.
// Note: Here we use a global thread safe std::map to convert instances of
// pthread_t to small thread identifier numbers (unique within one process).
// This method should be portable across different POSIX implementations.
//------------------------------------------------------------------------------

#if defined(_TTHREAD_POSIX_)
inline static thread::id _pthread_t_to_ID(const pthread_t &aHandle)
{
  static mutex idMapLock;
  static std::map<pthread_t, unsigned long int> idMap;
  static unsigned long int idCount(1);

  lock_guard<mutex> guard(idMapLock);
  if(idMap.find(aHandle) == idMap.end())
    idMap[aHandle] = idCount ++;
  return thread::id(idMap[aHandle]);
}
#endif // _TTHREAD_POSIX_


//------------------------------------------------------------------------------
// thread
//------------------------------------------------------------------------------

/// Information to pass to the new thread (what to run).
struct _thread_start_info {
  void (*mFunction)(void *); ///< Pointer to the function to be executed.
  void * mArg;               ///< Function argument for the thread function.
  thread * mThread;          ///< Pointer to the thread object.
};

// Thread wrapper function.
#if defined(_TTHREAD_WIN32_)
inline unsigned WINAPI thread::wrapper_function(void * aArg)
#elif defined(_TTHREAD_POSIX_)
inline void * thread::wrapper_function(void * aArg)
#endif
{
  // Get thread startup information
  _thread_start_info * ti = (_thread_start_info *) aArg;

  try
  {
    // Call the actual client thread function
    ti->mFunction(ti->mArg);
  }
  catch(...)
  {
    // Uncaught exceptions will terminate the application (default behavior
    // according to C++11)
    std::terminate();
  }

  // The thread is no longer executing
  lock_guard<mutex> guard(ti->mThread->mDataMutex);

  // On POSIX, we allow the thread to be joined even after execution has finished.
  // This is necessary to ensure that thread-local memory can be reclaimed.
#if defined(_TTHREAD_WIN32_)
  ti->mThread->mJoinable = false;
#endif

  // The thread is responsible for freeing the startup information
  delete ti;

  return 0;
}

inline thread::thread(void (*aFunction)(void *), void * aArg)
{
  // Serialize access to this thread structure
  lock_guard<mutex> guard(mDataMutex);

  // Fill out the thread startup information (passed to the thread wrapper,
  // which will eventually free it)
  _thread_start_info * ti = new _thread_start_info;
  ti->mFunction = aFunction;
  ti->mArg = aArg;
  ti->mThread = this;

  // Mark thread as joinable
  mJoinable = true;

  // Create the thread
#if defined(_TTHREAD_WIN32_)
  mHandle = (HANDLE) _beginthreadex(0, 0, wrapper_function, (void *) ti, 0, &mWin32ThreadID);
#elif defined(_TTHREAD_POSIX_)
  if(pthread_create(&mHandle, NULL, wrapper_function, (void *) ti) != 0)
    mHandle = 0;
#endif

  // Did we fail to create the thread?
  if(!mHandle)
  {
    mJoinable = false;
    delete ti;
  }

}

inline thread::~thread()
{
  if(joinable())
    std::terminate();
}

inline void thread::join()
{
  if(joinable())
  {
#if defined(_TTHREAD_WIN32_)
    WaitForSingleObject(mHandle, INFINITE);
    CloseHandle(mHandle);
#elif defined(_TTHREAD_POSIX_)
    pthread_join(mHandle, NULL);
#endif

    // https://linux.die.net/man/3/pthread_join states:
    //
    // Joining with a thread that has previously been joined results in undefined behavior.
    //
    // We just allow a thread to be joined once.
    mJoinable = false;
  }
}

inline bool thread::joinable() const
{
  mDataMutex.lock();
  bool result = mJoinable;
  mDataMutex.unlock();
  return result;
}

inline void thread::detach()
{
  // TODO: Attempting to detach a non-joinable thread should throw.
  // https://en.cppreference.com/w/cpp/thread/thread/detach
  mDataMutex.lock();
  if(mJoinable)
  {
#if defined(_TTHREAD_WIN32_)
    CloseHandle(mHandle);
#elif defined(_TTHREAD_POSIX_)
    pthread_detach(mHandle);
#endif
    mJoinable = false;
  }
  mDataMutex.unlock();
}

inline thread::id thread::get_id() const
{
  if(!joinable())
    return id();
#if defined(_TTHREAD_WIN32_)
  return id((unsigned long int) mWin32ThreadID);
#elif defined(_TTHREAD_POSIX_)
  return _pthread_t_to_ID(mHandle);
#endif
}

inline unsigned thread::hardware_concurrency()
{
#if defined(_TTHREAD_WIN32_)
  SYSTEM_INFO si;
  GetSystemInfo(&si);
  return (int) si.dwNumberOfProcessors;
#elif defined(_SC_NPROCESSORS_ONLN)
  return (int) sysconf(_SC_NPROCESSORS_ONLN);
#elif defined(_SC_NPROC_ONLN)
  return (int) sysconf(_SC_NPROC_ONLN);
#else
  // The standard requires this function to return zero if the number of
  // hardware cores could not be determined.
  return 0;
#endif
}


//------------------------------------------------------------------------------
// this_thread
//------------------------------------------------------------------------------

inline thread::id this_thread::get_id()
{
#if defined(_TTHREAD_WIN32_)
  return thread::id((unsigned long int) GetCurrentThreadId());
#elif defined(_TTHREAD_POSIX_)
  return _pthread_t_to_ID(pthread_self());
#endif
}

}



#endif // _TINYTHREAD_H_


================================================
FILE: inst/include/tthread/tinythread.inl
================================================
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
Copyright (c) 2010-2012 Marcus Geelnard

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source
    distribution.
*/

#include <exception>
#include "tinythread.h"

#if defined(_TTHREAD_POSIX_)
  #include <unistd.h>
  #include <map>
#elif defined(_TTHREAD_WIN32_)
  #include <process.h>
#endif


namespace tthread {

//------------------------------------------------------------------------------
// condition_variable
//------------------------------------------------------------------------------
// NOTE 1: The Win32 implementation of the condition_variable class is based on
// the corresponding implementation in GLFW, which in turn is based on a
// description by Douglas C. Schmidt and Irfan Pyarali:
// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
//
// NOTE 2: Windows Vista actually has native support for condition variables
// (InitializeConditionVariable, WakeConditionVariable, etc), but we want to
// be portable with pre-Vista Windows versions, so TinyThread++ does not use
// Vista condition variables.
//------------------------------------------------------------------------------

#if defined(_TTHREAD_WIN32_)
  #define _CONDITION_EVENT_ONE 0
  #define _CONDITION_EVENT_ALL 1
#endif

#if defined(_TTHREAD_WIN32_)
inline condition_variable::condition_variable() : mWaitersCount(0)
{
  mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL);
  mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL);
  InitializeCriticalSection(&mWaitersCountLock);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline condition_variable::~condition_variable()
{
  CloseHandle(mEvents[_CONDITION_EVENT_ONE]);
  CloseHandle(mEvents[_CONDITION_EVENT_ALL]);
  DeleteCriticalSection(&mWaitersCountLock);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline void condition_variable::_wait()
{
  // Wait for either event to become signaled due to notify_one() or
  // notify_all() being called
  int result = WaitForMultipleObjects(2, mEvents, FALSE, INFINITE);

  // Check if we are the last waiter
  EnterCriticalSection(&mWaitersCountLock);
  -- mWaitersCount;
  bool lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) &&
                    (mWaitersCount == 0);
  LeaveCriticalSection(&mWaitersCountLock);

  // If we are the last waiter to be notified to stop waiting, reset the event
  if(lastWaiter)
    ResetEvent(mEvents[_CONDITION_EVENT_ALL]);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline void condition_variable::notify_one()
{
  // Are there any waiters?
  EnterCriticalSection(&mWaitersCountLock);
  bool haveWaiters = (mWaitersCount > 0);
  LeaveCriticalSection(&mWaitersCountLock);

  // If we have any waiting threads, send them a signal
  if(haveWaiters)
    SetEvent(mEvents[_CONDITION_EVENT_ONE]);
}
#endif

#if defined(_TTHREAD_WIN32_)
inline void condition_variable::notify_all()
{
  // Are there any waiters?
  EnterCriticalSection(&mWaitersCountLock);
  bool haveWaiters = (mWaitersCount > 0);
  LeaveCriticalSection(&mWaitersCountLock);

  // If we have any waiting threads, send them a signal
  if(haveWaiters)
    SetEvent(mEvents[_CONDITION_EVENT_ALL]);
}
#endif


//------------------------------------------------------------------------------
// POSIX pthread_t to unique thread::id mapping logic.
// Note: Here we use a global thread safe std::map to convert instances of
// pthread_t to small thread identifier numbers (unique within one process).
// This method should be portable across different POSIX implementations.
//------------------------------------------------------------------------------

#if defined(_TTHREAD_POSIX_)
inline static thread::id _pthread_t_to_ID(const pthread_t &aHandle)
{
  static mutex idMapLock;
  static std::map<pthread_t, unsigned long int> idMap;
  static unsigned long int idCount(1);

  lock_guard<mutex> guard(idMapLock);
  if(idMap.find(aHandle) == idMap.end())
    idMap[aHandle] = idCount ++;
  return thread::id(idMap[aHandle]);
}
#endif // _TTHREAD_POSIX_


//------------------------------------------------------------------------------
// thread
//------------------------------------------------------------------------------

/// Information to pass to the new thread (what to run).
struct _thread_start_info {
  void (*mFunction)(void *); ///< Pointer to the function to be executed.
  void * mArg;               ///< Function argument for the thread function.
  thread * mThread;          ///< Pointer to the thread object.
};

// Thread wrapper function.
#if defined(_TTHREAD_WIN32_)
inline unsigned WINAPI thread::wrapper_function(void * aArg)
#elif defined(_TTHREAD_POSIX_)
inline void * thread::wrapper_function(void * aArg)
#endif
{
  // Get thread startup information
  _thread_start_info * ti = (_thread_start_info *) aArg;

  try
  {
    // Call the actual client thread function
    ti->mFunction(ti->mArg);
  }
  catch(...)
  {
    // Uncaught exceptions will terminate the application (default behavior
    // according to C++11)
    std::terminate();
  }

  // The thread is no longer executing
  lock_guard<mutex> guard(ti->mThread->mDataMutex);
  ti->mThread->mNotAThread = true;

  // The thread is responsible for freeing the startup information
  delete ti;

  return 0;
}

inline thread::thread(void (*aFunction)(void *), void * aArg)
{
  // Serialize access to this thread structure
  lock_guard<mutex> guard(mDataMutex);

  // Fill out the thread startup information (passed to the thread wrapper,
  // which will eventually free it)
  _thread_start_info * ti = new _thread_start_info;
  ti->mFunction = aFunction;
  ti->mArg = aArg;
  ti->mThread = this;

  // The thread is now alive
  mNotAThread = false;

  // Create the thread
#if defined(_TTHREAD_WIN32_)
  mHandle = (HANDLE) _beginthreadex(0, 0, wrapper_function, (void *) ti, 0, &mWin32ThreadID);
#elif defined(_TTHREAD_POSIX_)
  if(pthread_create(&mHandle, NULL, wrapper_function, (void *) ti) != 0)
    mHandle = 0;
#endif

  // Did we fail to create the thread?
  if(!mHandle)
  {
    mNotAThread = true;
    delete ti;
  }
}

inline thread::~thread()
{
  if(joinable())
    std::terminate();
}

inline void thread::join()
{
  if(joinable())
  {
#if defined(_TTHREAD_WIN32_)
    WaitForSingleObject(mHandle, INFINITE);
    CloseHandle(mHandle);
#elif defined(_TTHREAD_POSIX_)
    pthread_join(mHandle, NULL);
#endif
  }
}

inline bool thread::joinable() const
{
  mDataMutex.lock();
  bool result = !mNotAThread;
  mDataMutex.unlock();
  return result;
}

inline void thread::detach()
{
  mDataMutex.lock();
  if(!mNotAThread)
  {
#if defined(_TTHREAD_WIN32_)
    CloseHandle(mHandle);
#elif defined(_TTHREAD_POSIX_)
    pthread_detach(mHandle);
#endif
    mNotAThread = true;
  }
  mDataMutex.unlock();
}

inline thread::id thread::get_id() const
{
  if(!joinable())
    return id();
#if defined(_TTHREAD_WIN32_)
  return id((unsigned long int) mWin32ThreadID);
#elif defined(_TTHREAD_POSIX_)
  return _pthread_t_to_ID(mHandle);
#endif
}

inline unsigned thread::hardware_concurrency()
{
#if defined(_TTHREAD_WIN32_)
  SYSTEM_INFO si;
  GetSystemInfo(&si);
  return (int) si.dwNumberOfProcessors;
#elif defined(_SC_NPROCESSORS_ONLN)
  return (int) sysconf(_SC_NPROCESSORS_ONLN);
#elif defined(_SC_NPROC_ONLN)
  return (int) sysconf(_SC_NPROC_ONLN);
#else
  // The standard requires this function to return zero if the number of
  // hardware cores could not be determined.
  return 0;
#endif
}


//------------------------------------------------------------------------------
// this_thread
//------------------------------------------------------------------------------

inline thread::id this_thread::get_id()
{
#if defined(_TTHREAD_WIN32_)
  return thread::id((unsigned long int) GetCurrentThreadId());
#elif defined(_TTHREAD_POSIX_)
  return _pthread_t_to_ID(pthread_self());
#endif
}

}


================================================
FILE: inst/presentations/.gitignore
================================================
*.tex
*.pdf


================================================
FILE: inst/presentations/rcpp_parallel_talk_jan2015.Rmd
================================================
---
title: "R, Rcpp and Parallel Computing"
author: "Dirk Eddelbuettel and JJ Allaire"
date: "Jan 26-27, 2015\\newline Workshop for Distributed Computing in R\\newline HP Research, Palo Alto, CA"
output:
  beamer_presentation:
    includes:
      in_header: header.tex
    keep_tex: yes
    theme: Warsaw
fontsize: 12pt
subtitle: Notes from our Rcpp Experience
classoption: compress
---

# Intro

## One View on Parallel Computing

> The whole "let's parallelize" thing is a huge waste of everybody's
> time. There's this huge body of "knowledge" that parallel is somehow more
> efficient, and that whole huge body is pure and utter garbage. Big caches
> are efficient. Parallel stupid small cores without caches are horrible
> unless you have a very specific load that is hugely regular (ie graphics). 
>   
> [...]  
>   
> Give it up. The whole "parallel computing is the future" is a bunch of crock.


[Linus Torvalds, Dec 2014](http://www.realworldtech.com/forum/?threadid=146066&curpostid=146227)


## Another View on Big Data
\framesubtitle{Imagine a \texttt{gsub("DBMs", "", tweet)} to complement further...}

\centering{\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{images/big-data-big-machine-tweet.png}}

# R

## CRAN Task View on HPC

\framesubtitle{\texttt{http://cran.r-project.org/web/views/HighPerformanceComputing.html}}

Things R does well:

\medskip

- Package snow by Tierney et al a trailblazer
- Package Rmpi by Yu equally important
- multicore / snow / parallel even work on Windows
- Hundreds of applications
- _It just works_ for data-parallel tasks

# Rcpp

## Rcpp: Early Days

In the fairly early days of Rcpp, we also put out RInside as a simple C++
class wrapper around the R-embedding API.

It got one clever patch taking this (ie: R wrapped in C++ with its own
`main()` function) and encapsulating it within MPI. 

HP Vertica also uses Rcpp and RInside in 
[DistributedR](https://github.com/vertica/DistributedR/tree/master/third_party).

## Rcpp: More recently

Rcpp is now easy to deploy; Rcpp Attributes played a key role:

```r
#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
double piSugar(const int N) {
    NumericVector x = runif(N);
    NumericVector y = runif(N);
    NumericVector d = sqrt(x*x + y*y);
    return 4.0 * sum(d < 1.0) / N;
}
```

## Rcpp: Extensions

Rcpp Attributes also support "plugins"

OpenMP is easy to use and widely
supported (on suitable OS / compiler combinations).

So we added support via a plugin. Use is still not as wide-spread.

Errors have commonality: calling back into R.


# RcppParallel

## Parallel Programming for Rcpp Users

\framesubtitle{NOT like this...}

```cpp
using namespace boost;

void task()
{
   lock_guard<boost::mutex> lock(mutex);
   // etc...
}

threadpool::pool tp(thread::hardware_concurrency());
for (int i=0; i<slices; i++)
   tp.schedule(&task); 
```

## Parallel Programming for Rcpp Users

Goals:

* Encapsulate threading and locking
* Provide high level constructs for common parallel tasks
* High performance: locality, work stealing, etc.
* Safe access to R data structures on multiple threads


## Parallel Programming Alternatives
   
   \footnotesize
   
|   | TBB | OMP | RAW |
|---|:----------:|:------:|:-------:|
Task level parallelism | \textbullet | \textbullet |   |
Data decomposition support | \textbullet | \textbullet |   |
Non loop parallel patterns | \textbullet |   |   |
Generic parallel patterns | \textbullet |   |   |
Nested parallelism support | \textbullet |   |   |
Built in load balancing | \textbullet | \textbullet |   |
Affinity support |   | \textbullet | \textbullet |
Static scheduling |   | \textbullet |   |
Concurrent data structures | \textbullet |   |   |
Scalable memory allocator | \textbullet |   |   |

## TBB vs. OpenMP vs. Threads

* Raw threads shift too much burden for parallelization onto the developer (error prone and not performant)
* OpenMP is excellent for parallelizing existing loops where the iterations are independent (R already has some support for OpenMP)
* TBB fares better when there is more potential interaction between threads (e.g. more complex loops, simulations, or where concurrent containers are required).
* RcppParallel: Enable use of TBB with R to complement existing OpenMP stack.

## Win32 Platform Complications

* TBB supports mingw on Win32 however we haven't (yet) sorted out how to build it with Rtools
* As a result we use [TinyThread](http://tinythreadpp.bitsnbites.eu/) on Win32
* This requires that we create a layer to abstract over TBB and TinyThread (thus limiting the expressiveness of code that wants to be portable to Windows).
* Developers are still free to use all of TBB if they are content targeting only Linux and OSX
* Would love to see TBB working on Win32 (pull requests welcome!)

## R Concurrency Complications

R is single-threaded and includes this warning in [Writing R Extensions](http://cran.r-project.org/doc/manuals/r-release/R-exts.html) when discussing the use of OpenMP:

> Calling any of the R API from threaded code is ‘for experts only’: they will need to read the source code to determine if it is thread-safe. In particular, code which makes use of the stack-checking mechanism must not be called from threaded code.

However we don't really want to force Rcpp users to resort to reading the Rcpp and R source code to assess thread safety issues.

## RcppParallel Threadsafe Accessors

Since R vectors and matrices are just raw contiguous arrays it's easy to create threadsafe C++ wrappers for them:

* `RVector<T>` is a very thin wrapper over a C array.

* `RMatrix<T>` is the same but also provides `Row<T>` and `Column<T>` accessors/iterators.

The implementions of these classes are extremely lightweight and never call into Rcpp or the R API (so are always threadsafe).

## RcppParallel Operations

Two high-level operations are provided (with TBB and TinyThread implementations of each):

* `parallelFor` -- Convert the work of a standard serial "for" loop into a parallel one

* `parallelReduce` -- Used for accumulating aggregate or other values.

Not surprisingly the TBB versions of these operations perform ~ 50% better than the "naive" parallel implementation provided by TinyThread.

## Basic Mechanics: Create a Worker

Create a `Worker` class with `operator()` that RcppParallel uses to operate on discrete slices of the input data on different threads:

```cpp

class MyWorker : public RcppParallel::Worker {

   void operator()(size_t begin, size_t end) {
      // do some work from begin to end 
      // within the input data
   }
   
}

```

## Basic Mechanics: Call the Worker

Worker would typically take input and output data in it's constructor then save them as members (for reading/writing within `operator()`):

```cpp
NumericMatrix matrixSqrt(NumericMatrix x) {
  
  NumericMatrix output(x.nrow(), x.ncol());

  SquareRootWorker worker(x, output);
  
  parallelFor(0, x.length(), worker);
  
  return output;
}
```

## Basic Mechanics: Join Function

For `parallelReduce` you need to specify how data is to be combined. Typically you save data in a member within `operator()` then fuse it with another `Worker` instance in the `join` function.

```cpp
class SumWorker : public RcppParallel::Worker
     
   // join my value with that of another SumWorker
   void join(const SumWorker& rhs) { 
      value += rhs.value; 
   }
}

```

## What does all of this buy us?

* Developers just write pieces of code that are called at the correct time by an intelligent parallel supervisor
* In most cases no locking or explicit thread management required!
* Supervisor does some intelligent optimization around:
    - Grain size (which affects locality of reference and therefore cache hit rates). Note that grain size can also be tuned directly per-application.
    - Work stealing (detecting idle threads and pushing work to them)
* In the case of TBB, high performance concurrent containers are available if necessary

## Examples

* All available on the Rcpp Gallery <http://gallery.rcpp.org>

* Tested with 4 cores on a 2.6GHz Haswell MacBook Pro

* Note that benchmarks will be 30-50% slower on Windows because we aren't using the more sophisticated scheduling of TBB

## Example: Transforming a Matrix in Parallel

\framesubtitle{\texttt{http://gallery.rcpp.org/articles/parallel-matrix-transform}}

```cpp
 void operator()(size_t begin, size_t end) {
      std::transform(input.begin() + begin, 
                     input.begin() + end, 
                     output.begin() + begin, 
                     ::sqrt);
   }
```

```
                   test replications elapsed relative
2 parallelMatrixSqrt(m)          100   0.294    1.000
1         matrixSqrt(m)          100   0.755    2.568
```

## Example: Summing a Vector in Parallel

\framesubtitle{\texttt{http://gallery.rcpp.org/articles/parallel-vector-sum}}


```cpp
void operator()(size_t begin, size_t end) {
   value += std::accumulate(input.begin() + begin, 
                            input.begin() + end, 
                            0.0);
}    
void join(const Sum& rhs) { 
   value += rhs.value; 
}
```
```
                  test replications elapsed relative
2 parallelVectorSum(v)          100   0.182    1.000
1         vectorSum(v)          100   0.857    4.709
```

## Example: Parallel Distance Matrix Calculation

\framesubtitle{\texttt{http://gallery.rcpp.org/articles/parallel-distance-matrix}}

```
                       test reps elapsed relative
3 rcpp_parallel_distance(m)    3   0.110    1.000
2          rcpp_distance(m)    3   0.618    5.618
1               distance(m)    3  35.560  323.273
```

* Rcpp + RcppParallel = 323x over R implementation!
* Unbalanced workload benefits from work stealing

## The Rest of TBB

* Advanced algorithms: `parallel_scan`, `parallel_while`, `parallel_do`, `parallel_pipeline`, `parallel_sort`
* Containers: `concurrent_queue`, `concurrent_priority_queue`, `concurrent_vector`, `concurrent_hash_map`
* Mutual exclusion: `mutex`, `spin_mutex`, `queuing_mutex`, `spin_rw_mutex`, `queuing_rw_mutex`, `recursive_mutex`
* Atomic operations: `fetch_and_add`, `fetch_and_increment`, `fetch_and_decrement`, `compare_and_swap`, `fetch_and_store`
* Timing: portable fine grained global time stamp
* Task Scheduler: direct access to control the creation and activation of tasks

## Open Issues

* Additional (portable to Win32 via TinyThread) wrappers for other TBB constructs?

* Alternatively, sort out Rtools configuration issues required to get TBB working on Windows.

* Education: Parallel Programming is _hard_. 
    
* Simple `parallelFor` and `parallelReduce` are reasonably easy to grasp, but more advanced idioms aren't trivial to learn and use (but for some applications have lots of upside so are worth the effort).

    


================================================
FILE: inst/rstudio/templates/project/RcppParallel.package.skeleton.dcf
================================================
Binding: RcppParallel.package.skeleton
Title: R Package using RcppParallel
Subtitle: Create a new R Package using RcppParallel
Caption: Create R Package using RcppParallel
OpenFiles: src/vector-sum.cpp

Parameter: example_code
Widget: CheckboxInput
Label: Include an example C++ file using RcppParallel
Default: On


================================================
FILE: inst/skeleton/vector-sum.Rd
================================================
\name{parallelVectorSum}
\alias{parallelVectorSum}
\docType{package}
\title{
Simple function using RcppParallel
}
\description{
Simple function using RcppParallel
}
\usage{
parallelVectorSum(x)
}
\arguments{
\item{x}{A numeric vector.}
}
\examples{
\dontrun{
parallelVectorSum(1:20)
}
}


================================================
FILE: inst/skeleton/vector-sum.cpp
================================================
/**
 *
 * This file contains example code showcasing how RcppParallel
 * can be used. In this file, we define and export a function called
 * 'parallelVectorSum()', which computes the sum of a numeric vector
 * in parallel.
 *
 * Please see https://rcppcore.github.io/RcppParallel/ for more
 * details on how to use RcppParallel in an R package, and the
 * Rcpp gallery at http://gallery.rcpp.org/ for more examples.
 *
 */

// [[Rcpp::depends(RcppParallel)]]
#include <Rcpp.h>
#include <RcppParallel.h>

using namespace Rcpp;
using namespace RcppParallel;

struct Sum : public Worker
{
   // source vector
   const RVector<double> input;

   // accumulated value
   double value;

   // constructors
   Sum(const NumericVector input) : input(input), value(0) {}
   Sum(const Sum& sum, Split) : input(sum.input), value(0) {}

   // accumulate just the element of the range I've been asked to
   void operator()(std::size_t begin, std::size_t end) {
      value += std::accumulate(input.begin() + begin, input.begin() + end, 0.0);
   }

   // join my value with that of another Sum
   void join(const Sum& rhs) {
      value += rhs.value;
   }
};

// [[Rcpp::export]]
double parallelVectorSum(NumericVector x) {

   // declare the SumBody instance
   Sum sum(x);

   // call parallel_reduce to start the work
   parallelReduce(0, x.length(), sum);

   // return the computed sum
   return sum.value;
}


================================================
FILE: inst/tests/cpp/distance.cpp
================================================
/**
 * @title Parallel Distance Matrix Calculation with RcppParallel
 * @author JJ Allaire and Jim Bullard
 * @license GPL (>= 2)
 */

#include <Rcpp.h>
using namespace Rcpp;

#include <cmath>
#include <algorithm>

// generic function for kl_divergence
template <typename InputIterator1, typename InputIterator2>
inline double kl_divergence(InputIterator1 begin1, InputIterator1 end1, 
                            InputIterator2 begin2) {
  
   // value to return
   double rval = 0;
   
   // set iterators to beginning of ranges
   InputIterator1 it1 = begin1;
   InputIterator2 it2 = begin2;
   
   // for each input item
   while (it1 != end1) {
      
      // take the value and increment the iterator
      double d1 = *it1++;
      double d2 = *it2++;
      
      // accumulate if appropirate
      if (d1 > 0 && d2 > 0)
         rval += std::log(d1 / d2) * d1;
   }
   return rval;  
}

// helper function for taking the average of two numbers
inline double average(double val1, double val2) {
   return (val1 + val2) / 2;
}

// [[Rcpp::export]]
NumericMatrix rcpp_js_distance(NumericMatrix mat) {
  
   // allocate the matrix we will return
   NumericMatrix rmat(mat.nrow(), mat.nrow());
   
   for (int i = 0; i < rmat.nrow(); i++) {
      for (int j = 0; j < i; j++) {
      
         // rows we will operate on
         NumericMatrix::Row row1 = mat.row(i);
         NumericMatrix::Row row2 = mat.row(j);
         
         // compute the average using std::tranform from the STL
         std::vector<double> avg(row1.size());
         std::transform(row1.begin(), row1.end(), // input range 1
                        row2.begin(),             // input range 2
                        avg.begin(),              // output range 
                        average);                 // function to apply
      
         // calculate divergences
         double d1 = kl_divergence(row1.begin(), row1.end(), avg.begin());
         double d2 = kl_divergence(row2.begin(), row2.end(), avg.begin());
        
         // write to output matrix
         rmat(i,j) = std::sqrt(.5 * (d1 + d2));
      }
   }
   
   return rmat;
}

// [[Rcpp::depends(RcppParallel)]]
#include <RcppParallel.h>
using namespace RcppParallel;

struct JsDistance : public Worker {
   
   // input matrix to read from
   const RMatrix<double> mat;
   
   // output matrix to write to
   RMatrix<double> rmat;
   
   // initialize from Rcpp input and output matrixes (the RMatrix class
   // can be automatically converted to from the Rcpp matrix type)
   JsDistance(const NumericMatrix mat, NumericMatrix rmat)
      : mat(mat), rmat(rmat) {}
   
   // function call operator that work for the specified range (begin/end)
   void operator()(std::size_t begin, std::size_t end) {
      for (std::size_t i = begin; i < end; i++) {
         for (std::size_t j = 0; j < i; j++) {
            
            // rows we will operate on
            RMatrix<double>::Row row1 = mat.row(i);
            RMatrix<double>::Row row2 = mat.row(j);
            
            // compute the average using std::tranform from the STL
            std::vector<double> avg(row1.length());
            std::transform(row1.begin(), row1.end(), // input range 1
                           row2.begin(),             // input range 2
                           avg.begin(),              // output range 
                           average);                 // function to apply
              
            // calculate divergences
            double d1 = kl_divergence(row1.begin(), row1.end(), avg.begin());
            double d2 = kl_divergence(row2.begin(), row2.end(), avg.begin());
               
            // write to output matrix
            rmat(i,j) = sqrt(.5 * (d1 + d2));
         }
      }
   }
};

// [[Rcpp::export]]
NumericMatrix rcpp_parallel_js_distance(NumericMatrix mat) {
  
   // allocate the matrix we will return
   NumericMatrix rmat(mat.nrow(), mat.nrow());

   // create the worker
   JsDistance jsDistance(mat, rmat);
     
   // call it with parallelFor
   parallelFor(0, mat.nrow(), jsDistance);

   return rmat;
}



================================================
FILE: inst/tests/cpp/innerproduct.cpp
================================================
/**
 * @title Computing an Inner Product with RcppParallel
 * @author JJ Allaire
 * @license GPL (>= 2)
 */

#include <Rcpp.h>
using namespace Rcpp;

#include <algorithm>

// [[Rcpp::export]]
double innerProduct(NumericVector x, NumericVector y) {
   return std::inner_product(x.begin(), x.end(), y.begin(), 0.0);
}

// [[Rcpp::depends(RcppParallel)]]
#include <RcppParallel.h>
using namespace RcppParallel;

struct InnerProduct : public Worker
{
   // source vectors
   const RVector<double> x;
   const RVector<double> y;

   // product that I have accumulated
   double product;

   // constructors
   InnerProduct(const NumericVector x, const NumericVector y)
      : x(x), y(y), product(0) {}
   InnerProduct(const InnerProduct& innerProduct, Split)
      : x(innerProduct.x), y(innerProduct.y), product(0) {}

   // process just the elements of the range I have been asked to
   void operator()(std::size_t begin, std::size_t end) {
      product += std::inner_product(x.begin() + begin,
                                    x.begin() + end,
                                    y.begin() + begin,
                                    0.0);
   }

   // join my value with that of another InnerProduct
   void join(const InnerProduct& rhs) {
     product += rhs.product;
   }
};

// [[Rcpp::export]]
double parallelInnerProduct(NumericVector x, NumericVector y) {

   // declare the InnerProduct instance that takes a pointer to the vector data
   InnerProduct innerProduct(x, y);

   // call paralleReduce to start the work
   parallelReduce(0, x.length(), innerProduct);

   // return the computed product
   return innerProduct.product;
}



================================================
FILE: inst/tests/cpp/sum.cpp
================================================
/**
 * @title Summing a Vector in Parallel with RcppParallel
 * @author JJ Allaire
 * @license GPL (>= 2)
 */

#include <Rcpp.h>
#include <RcppParallel.h>

// [[Rcpp::depends(RcppParallel)]]
using namespace RcppParallel;
using namespace Rcpp;

struct Sum : public Worker
{
   // source vector
   const RVector<double> input;

   // accumulated value
   double value;

   // constructors
   Sum(const NumericVector input) : input(input), value(0) {}
   Sum(const Sum& sum, Split) : input(sum.input), value(0) {}

   // accumulate just the element of the range I have been asked to
   void operator()(std::size_t begin, std::size_t end) {
      value += std::accumulate(input.begin() + begin, input.begin() + end, 0.0);
   }

   // join my value with that of another Sum
   void join(const Sum& rhs) {
      value += rhs.value;
   }
};

// [[Rcpp::export]]
double parallelVectorSum(NumericVector x) {

   // declare the SumBody instance
   Sum sum(x);

   // call parallel_reduce to start the work
   parallelReduce(0, x.length(), sum);

   // return the computed sum
   return sum.value;
}

// [[Rcpp::export]]
double vectorSum(NumericVector x) {
   return std::accumulate(x.begin(), x.end(), 0.0);
}




================================================
FILE: inst/tests/cpp/transform.cpp
================================================
/**
 * @title Transforming a Matrix in Parallel using RcppParallel
 * @author JJ Allaire
 * @license GPL (>= 2)
 */
 
#include <Rcpp.h>
using namespace Rcpp;

#include <cmath>
#include <algorithm>

double squareRoot(double x) {
   return ::sqrt(x);
}

// [[Rcpp::export]]
NumericMatrix matrixSqrt(NumericMatrix orig) {

  // allocate the matrix we will return
  NumericMatrix mat(orig.nrow(), orig.ncol());

  // transform it
  std::transform(orig.begin(), orig.end(), mat.begin(), squareRoot);

  // return the new matrix
  return mat;
}
// [[Rcpp::depends(RcppParallel)]]
#include <RcppParallel.h>
using namespace RcppParallel;

struct SquareRoot : public Worker
{
   // source matrix
   const RMatrix<double> input;
   
   // destination matrix
   RMatrix<double> output;
   
   // initialize with source and destination
   SquareRoot(const NumericMatrix input, NumericMatrix output) 
      : input(input), output(output) {}
   
   // take the square root of the range of elements requested
   void operator()(std::size_t begin, std::size_t end) {
      std::transform(input.begin() + begin, 
                     input.begin() + end, 
                     output.begin() + begin, 
                     squareRoot);
   }
};

// [[Rcpp::export]]
NumericMatrix parallelMatrixSqrt(NumericMatrix x) {
  
  // allocate the output matrix
  NumericMatrix output(x.nrow(), x.ncol());
  
  // SquareRoot functor (pass input and output matrixes)
  SquareRoot squareRoot(x, output);
  
  // call parallelFor to do the work
  parallelFor(0, x.nrow() * x.ncol(), squareRoot);
  
  // return the output matrix
  return output;
}



================================================
FILE: inst/tests/cpp/truefalse_macros.cpp
================================================
/**
 * @title Test for TRUE and FALSE macros
 * @author Travers Ching
 * @license GPL (>= 2)
 */

// TRUE and FALSE macros that may come with system headers on some systems
// But conflict with R.h (R_ext/Boolean.h)
// TRUE and FALSE macros should be undef in RcppParallel.h

#include <Rcpp.h>
#include <RcppParallel.h>

// [[Rcpp::depends(RcppParallel)]]

#ifndef TRUE
static_assert(true, "Macro TRUE does not exist");
#else
static_assert(false, "Macro TRUE exists");
#endif

#ifndef FALSE
static_assert(true, "Macro FALSE does not exist");
#else
static_assert(false, "Macro FALSE exists");
#endif

// [[Rcpp::export]]
int hush_no_export_warning() {
  return 1;
}

================================================
FILE: inst/tests/runit.distance.R
================================================

library(Rcpp)
library(RUnit)

sourceCpp(system.file("tests/cpp/distance.cpp", package = "RcppParallel")) 

test.distance <- function() {
   
   n <- 1000
   m <- matrix(runif(n*10), ncol = 10)
   m <- m/rowSums(m)
   
   checkEquals(
      rcpp_js_distance(m), 
      rcpp_parallel_js_distance(m)
   )
   
}


================================================
FILE: inst/tests/runit.innerproduct.R
================================================

library(Rcpp)
library(RUnit)

sourceCpp(system.file("tests/cpp/innerproduct.cpp", package = "RcppParallel"))

test.innerproduct <- function() {
   
   x <- runif(1000000)
   y <- runif(1000000)
   
   checkEquals(
      innerProduct(x, y), 
      parallelInnerProduct(x, y)
   )
   
}


================================================
FILE: inst/tests/runit.sum.R
================================================

library(Rcpp)
library(RUnit)

sourceCpp(system.file("tests/cpp/sum.cpp", package = "RcppParallel"))

test.sum <- function() {
   
   v <- as.numeric(c(1:10000000))
   
   checkEquals(
      vectorSum(v), 
      parallelVectorSum(v)
   )
}


================================================
FILE: inst/tests/runit.transform.R
================================================

library(Rcpp)
library(RUnit)

sourceCpp(system.file("tests/cpp/transform.cpp", package = "RcppParallel"))

test.transform <- function() {
   
   m <- matrix(as.numeric(c(1:1000000)), nrow = 1000, ncol = 1000)
   
   checkEquals(
      matrixSqrt(m), 
      parallelMatrixSqrt(m)
   )   
}


================================================
FILE: inst/tests/runit.truefalse_macros.R
================================================

library(Rcpp)
library(RUnit)

sourceCpp(system.file("tests/cpp/truefalse_macros.cpp", package = "RcppParallel"))



================================================
FILE: man/RcppParallel-package.Rd
================================================
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppParallel-package.R
\docType{package}
\name{RcppParallel-package}
\alias{RcppParallel-package}
\alias{RcppParallel}
\title{Parallel programming tools for Rcpp}
\description{
High level functions for doing parallel programming with Rcpp.  For example,
the \code{parallelFor()} function can be used to convert the work of a
standard serial "for" loop into a parallel one, and the \code{parallelReduce()}
function can be used for accumulating aggregate or other values.
}
\details{
The high level interface enables safe and robust parallel programming
without direct manipulation of operating system threads. On Windows, macOS,
and Linux systems the underlying implementation is based on Intel TBB
(Threading Building Blocks). On other platforms, a less-performant fallback
implementation based on the TinyThread library is used.

For additional documentation, see the package website at:

\url{https://rcppcore.github.io/RcppParallel/}
}
\keyword{package}
\keyword{parallel}


================================================
FILE: man/RcppParallel.package.skeleton.Rd
================================================
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/skeleton.R
\name{RcppParallel.package.skeleton}
\alias{RcppParallel.package.skeleton}
\title{Create a skeleton for a new package depending on RcppParallel}
\usage{
RcppParallel.package.skeleton(name = "anRpackage", example_code = TRUE, ...)
}
\arguments{
\item{name}{The name of your R package.}

\item{example_code}{If \code{TRUE}, example C++ code using RcppParallel is
added to the package.}

\item{...}{Optional arguments passed to \link[Rcpp]{Rcpp.package.skeleton}.}
}
\value{
Nothing, used for its side effects
}
\description{
\code{RcppParallel.package.skeleton} automates the creation of a new source
package that intends to use features of RcppParallel.
}
\details{
It is based on the \link[utils]{package.skeleton} function which it executes
first.

In addition to \link[Rcpp]{Rcpp.package.skeleton} :

The \samp{DESCRIPTION} file gains an Imports line requesting that the
package depends on RcppParallel and a LinkingTo line so that the package
finds RcppParallel header files.

The \samp{NAMESPACE} gains a \code{useDynLib} directive as well as an
\code{importFrom(RcppParallel, evalCpp} to ensure instantiation of
RcppParallel.

The \samp{src} directory is created if it does not exists and a
\samp{Makevars} file is added setting the environment variables
\samp{PKG_LIBS} to accomodate the necessary flags to link with the
RcppParallel library.

If the \code{example_code} argument is set to \code{TRUE}, example files
\samp{vector-sum.cpp} is created in the \samp{src} directory.
\code{Rcpp::compileAttributes()} is then called to generate
\code{src/RcppExports.cpp} and \code{R/RcppExports.R}. These files are given
as an example and should eventually by removed from the generated package.
}
\examples{

\dontrun{
# simple package
RcppParallel.package.skeleton("foobar")
}

}
\references{
Read the \emph{Writing R Extensions} manual for more details.

Once you have created a \emph{source} package you need to install it: see
the \emph{R Installation and Administration} manual, \code{\link{INSTALL}}
and \code{\link{install.packages}}.
}
\seealso{
\link[utils]{package.skeleton}
}
\keyword{programming}


================================================
FILE: man/flags.Rd
================================================
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flags.R
\name{flags}
\alias{flags}
\alias{RcppParallelLibs}
\alias{LdFlags}
\alias{CxxFlags}
\title{Compilation flags for RcppParallel}
\usage{
CxxFlags()

LdFlags()

RcppParallelLibs()
}
\value{
Returns \code{NULL}, invisibly. These functions are called for
their side effects (writing the associated flags to stdout).
}
\description{
Output the compiler or linker flags required to build against RcppParallel.
}
\details{
These functions are typically called from \code{Makevars} as follows:\preformatted{PKG_LIBS += $(shell "$\{R_HOME\}/bin/Rscript" -e "RcppParallel::LdFlags()")
}

On Windows, the flags ensure that the package links with the built-in TBB
library. On Linux and macOS, the output is empty, because TBB is loaded
dynamically on load by \code{RcppParallel}.

\R packages using RcppParallel should also add the following to their
\code{NAMESPACE} file:\preformatted{importFrom(RcppParallel, RcppParallelLibs)
}

This is necessary to ensure that \pkg{RcppParallel} (and so, TBB) is loaded
and available.
}


================================================
FILE: man/setThreadOptions.Rd
================================================
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/options.R
\name{setThreadOptions}
\alias{setThreadOptions}
\alias{defaultNumThreads}
\title{Thread options for RcppParallel}
\usage{
setThreadOptions(numThreads = "auto", stackSize = "auto")

defaultNumThreads()
}
\arguments{
\item{numThreads}{Number of threads to use for task scheduling. Call \code{defaultNumThreads()}
to determine the the default value used for "auto".}

\item{stackSize}{Stack size (in bytes) to use for worker threads. The
default used for "auto" is 2MB on 32-bit systems and 4MB on 64-bit systems
(note that this parameter has no effect on Windows).}
}
\value{
\code{defaultNumThreads()} returns the default number of threads used by
RcppParallel, if another value isn't specified either via
\code{setThreadOptions()} or explicitly in calls to \code{parallelFor()} and
\code{parallelReduce()}.
}
\description{
Set thread options (number of threads to use for task scheduling and stack
size per-thread) for RcppParallel.
}
\details{
RcppParallel is automatically initialized with the default number of threads
and thread stack size when it loads. You can call \code{setThreadOptions()} at
any time to change the defaults.

The \code{parallelFor()} and \code{parallelReduce()} also accept \code{numThreads} as
an argument, if you'd like to control the number of threads specifically
to be made available for a particular parallel function call. Note that
this value is advisory, and TBB may choose a smaller number of threads
if the number of requested threads cannot be honored on the system.
}
\examples{

\dontrun{
library(RcppParallel)
setThreadOptions(numThreads = 4)
defaultNumThreads()
}

}


================================================
FILE: man/tbbLibraryPath.Rd
================================================
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbb.R
\name{tbbLibraryPath}
\alias{tbbLibraryPath}
\title{Get the Path to a TBB Library}
\usage{
tbbLibraryPath(name = NULL)
}
\arguments{
\item{name}{The name of the TBB library to be resolved. Normally, this is one of
\code{tbb}, \code{tbbmalloc}, or \code{tbbmalloc_proxy}. When \code{NULL}, the library
path containing the TBB libraries is returned instead.}
}
\description{
Retrieve the path to a TBB library. This can be useful for \R packages
using RcppParallel that wish to use, or re-use, the version of TBB that
RcppParallel has been configured to use.
}


================================================
FILE: patches/windows_arm64.diff
================================================
diff --git a/src/tbb/build/Makefile.tbb b/src/tbb/build/Makefile.tbb
index 8d155f80..c58f4fb1 100644
--- a/src/tbb/build/Makefile.tbb
+++ b/src/tbb/build/Makefile.tbb
@@ -91,7 +91,11 @@ ifneq (,$(TBB.DEF))
 tbb.def: $(TBB.DEF) $(TBB.LST)
 	$(CPLUS) $(PREPROC_ONLY) $< $(CPLUS_FLAGS) $(INCLUDES) > $@
 
-LIB_LINK_FLAGS += $(EXPORT_KEY)tbb.def
+# LLVM on Windows doesn't need --version-script export
+# https://reviews.llvm.org/D63743
+ifeq (, $(WINARM64_CLANG))
+  LIB_LINK_FLAGS += $(EXPORT_KEY)tbb.def
+endif
 $(TBB.DLL): tbb.def
 endif
 
diff --git a/src/tbb/build/Makefile.tbbmalloc b/src/tbb/build/Makefile.tbbmalloc
index 421e95c5..e7c38fa4 100644
--- a/src/tbb/build/Makefile.tbbmalloc
+++ b/src/tbb/build/Makefile.tbbmalloc
@@ -74,7 +74,11 @@ ifneq (,$(MALLOC.DEF))
 tbbmalloc.def: $(MALLOC.DEF)
 	$(CPLUS) $(PREPROC_ONLY) $< $(M_CPLUS_FLAGS) $(WARNING_SUPPRESS) $(INCLUDES) > $@
 
-MALLOC_LINK_FLAGS += $(EXPORT_KEY)tbbmalloc.def
+# LLVM on Windows doesn't need --version-script export
+# https://reviews.llvm.org/D63743
+ifeq (, $(WINARM64_CLANG))
+  MALLOC_LINK_FLAGS += $(EXPORT_KEY)tbbmalloc.def
+endif
 $(MALLOC.DLL): tbbmalloc.def
 endif
 
diff --git a/src/tbb/src/tbbmalloc/TypeDefinitions.h b/src/tbb/src/tbbmalloc/TypeDefinitions.h
index 3178442e..fd4b7956 100644
--- a/src/tbb/src/tbbmalloc/TypeDefinitions.h
+++ b/src/tbb/src/tbbmalloc/TypeDefinitions.h
@@ -25,7 +25,7 @@
 #       define __ARCH_ipf 1
 #   elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support
 #       define __ARCH_x86_32 1
-#   elif defined(_M_ARM)
+#   elif defined(_M_ARM) || defined(__aarch64__)
 #       define __ARCH_other 1
 #   else
 #       error Unknown processor architecture for Windows


================================================
FILE: src/.gitignore
================================================
*.o
*.so
*.dll

Makevars
Makevars.win


================================================
FILE: src/Makevars.in
================================================

# This needs to expand to something the shell will accept as '$ORIGIN',
# including a literal '$' (no variable expansion)
ORIGIN = \$$ORIGIN

CMAKE = @CMAKE@
R = @R@

TBB_LIB         = @TBB_LIB@
TBB_INC         = @TBB_INC@
TBB_NAME        = @TBB_NAME@
TBB_MALLOC_NAME = @TBB_MALLOC_NAME@

PKG_CPPFLAGS = @PKG_CPPFLAGS@
PKG_CXXFLAGS = @PKG_CXXFLAGS@

PKG_LIBS = @PKG_LIBS@ @PKG_LIBS_EXTRA@

all: tbb $(SHLIB)

# TBB needs to be built before our C++ sources are built, so that
# headers are copied and available from the expected locations.
$(OBJECTS): tbb

# NOTE: TBB libraries are installed via install.libs.R.
# However, we need to copy headers here so that they are visible during compilation.
tbb: tbb-clean
	@TBB_LIB="$(TBB_LIB)" TBB_INC="$(TBB_INC)"                  \
	TBB_NAME="$(TBB_NAME)" TBB_MALLOC_NAME="$(TBB_MALLOC_NAME)" \
	CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"        \
	CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)"	LDFLAGS="$(LDFLAGS)"    \
	CMAKE="$(CMAKE)" "@R@" -s -f install.libs.R --args build

# NOTE: we do not want to clean ../inst/lib or ../inst/libs here,
# as we may be writing to those locations in multiarch builds
tbb-clean:
	@rm -rf ../inst/include/tbb
	@rm -rf ../inst/include/oneapi
	@rm -rf ../inst/include/tbb_local
	@rm -rf ../inst/include/serial


================================================
FILE: src/init.cpp
================================================

#include <R.h>
#include <Rinternals.h>
#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>

/* .Call calls */
extern "C" SEXP defaultNumThreads();

static const R_CallMethodDef CallEntries[] = {
   {"defaultNumThreads", (DL_FUNC) &defaultNumThreads, 0},
   {NULL, NULL, 0}
};

extern "C" void R_init_RcppParallel(DllInfo *dll)
{
   R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
   R_useDynamicSymbols(dll, FALSE);
}


================================================
FILE: src/install.libs.R
================================================

# !diagnostics suppress=R_PACKAGE_DIR,SHLIB_EXT,R_ARCH
.install.libs <- function(tbbLib) {

   # copy default library
   files <- Sys.glob(paste0("*", SHLIB_EXT))
   dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH))
   dir.create(dest, recursive = TRUE, showWarnings = FALSE)
   file.copy(files, dest, overwrite = TRUE)

   # copy symbols if available
   if (file.exists("symbols.rds"))
      file.copy("symbols.rds", dest, overwrite = TRUE)

   # also copy to package 'libs' folder, for devtools
   libsDest <- paste0("../libs", R_ARCH)
   dir.create(libsDest, recursive = TRUE, showWarnings = FALSE)
   file.copy(files, libsDest, overwrite = TRUE)

   # copy tbb (NOTE: do not use inst/ folder as R will resolve symlinks,
   # behavior which we do _not_ want here!)
   tbbDest <- file.path(R_PACKAGE_DIR, paste0("lib", R_ARCH))
   dir.create(tbbDest, recursive = TRUE, showWarnings = FALSE)

   # note: on Linux, TBB gets compiled with extensions like
   # '.so.2', so be ready to handle those
   shlibPattern <- switch(
      Sys.info()[["sysname"]],
      Windows = "^tbb.*\\.dll$",
      Darwin  = "^libtbb.*\\.dylib$",
      "^libtbb.*\\.so.*$"
   )
   # WASM only supports static libraries
   if (R.version$os == "emscripten") {
      shlibPattern <- "^libtbb.*\\.a$"
   }

   if (!nzchar(tbbLib)) {

      # using bundled TBB
      tbbLibs <- list.files(
         path       = "tbb/build/lib_release",
         pattern    = shlibPattern,
         full.names = TRUE
      )

      for (tbbLib in tbbLibs) {
         system2("cp", c("-P", shQuote(tbbLib), shQuote(tbbDest)))
      }

   } else {

      # using system tbb
      tbbLibs <- list.files(
         path       = tbbLib,
         pattern    = shlibPattern,
         full.names = TRUE
      )

      # don't copy symlinks
      tbbLibs <- tbbLibs[!nzchar(Sys.readlink(tbbLibs))]

      # copy / link the libraries
      useSymlinks <- Sys.getenv("TBB_USE_SYMLINKS", unset = .Platform$OS.type != "windows")
      if (useSymlinks) {
         file.symlink(tbbLibs, tbbDest)
      } else {
         for (tbbLib in tbbLibs) {
            system2("cp", c("-P", shQuote(tbbLib), shQuote(tbbDest)))
         }
      }

   }

   # on Windows, we create a stub library that links to us so that
   # older binaries (like rstan) can still load
   if (.Platform$OS.type == "windows") {
      tbbDll <- file.path(tbbDest, "tbb.dll")
      if (!file.exists(tbbDll)) {
         writeLines("** creating tbb stub library")
         status <- system("R CMD SHLIB -o tbb-compat/tbb.dll tbb-compat/tbb-compat.cpp")
         if (status != 0)
            stop("error building tbb stub library")
         file.copy("tbb-compat/tbb.dll", file.path(tbbDest, "tbb.dll"))
      }
   }

}

useTbbPreamble <- function(tbbInc) {
   dir.create("../inst/include", recursive = TRUE, showWarnings = FALSE)
   for (suffix in c("oneapi", "serial", "tbb")) {
      tbbPath <- file.path(tbbInc, suffix)
      if (file.exists(tbbPath)) {
         file.copy(tbbPath, "../inst/include", recursive = TRUE)
      }
   }
}

useSystemTbb <- function(tbbLib, tbbInc) {
   useTbbPreamble(tbbInc)
}

useBundledTbb <- function() {

   useTbbPreamble("tbb/include")
   dir.create("tbb/build-tbb", showWarnings = FALSE)

   cmake <- Sys.getenv("CMAKE", unset = "cmake")
   buildType <- Sys.getenv("CMAKE_BUILD_TYPE", unset = "Release")
   verbose <- Sys.getenv("VERBOSE", unset = "0")

   splitCompilerVar("CC", "CFLAGS")
   splitCompilerVar("CXX", "CXXFLAGS")

   prependFlags("CPPFLAGS", "CFLAGS")
   prependFlags("CPPFLAGS", "CXXFLAGS")

   cmakeFlags <- c(
      forwardEnvVar("CC", "CMAKE_C_COMPILER"),
      forwardEnvVar("CXX", "CMAKE_CXX_COMPILER"),
      forwardEnvVar("CFLAGS", "CMAKE_C_FLAGS"),
      forwardEnvVar("CXXFLAGS", "CMAKE_CXX_FLAGS"),
      forwardEnvVar("CMAKE_BUILD_TYPE", "CMAKE_BUILD_TYPE"),
      "-DTBB_TEST=0",
      "-DTBB_EXAMPLES=0",
      "-DTBB_STRICT=0",
      ".."
   )

   if (R.version$os == "emscripten") {
      cmakeFlags <- c(
         "-DEMSCRIPTEN=1",
         "-DTBBMALLOC_BUILD=0",
         "-DBUILD_SHARED_LIBS=0",
         cmakeFlags
      )
   }

   writeLines("*** configuring tbb")
   owd <- setwd("tbb/build-tbb")
   output <- system2(cmake, shQuote(cmakeFlags), stdout = TRUE, stderr = TRUE)
   status <- attr(output, "status")
   if (is.numeric(status) && status != 0L) {
      writeLines(output)
      stop("error configuring tbb (status code ", status, ")")
   } else if (!identical(verbose, "0")) {
      writeLines(output)
   }
   setwd(owd)

   if (!identical(verbose, "0")) {
      writeLines("*** dumping CMakeCache.txt")
      writeLines(readLines("tbb/build-tbb/CMakeCache.txt"))
   }

   writeLines("*** building tbb")
   owd <- setwd("tbb/build-tbb")
   output <- system2(cmake, c("--build", ".", "--config", "release"), stdout = TRUE, stderr = TRUE)
   status <- attr(output, "status")
   if (is.numeric(status) && status != 0L) {
      writeLines(output)
      stop("error building tbb (status code ", status, ")")
   } else if (!identical(verbose, "0")) {
      writeLines(output)
   }
   setwd(owd)

   shlibPattern <- switch(
      Sys.info()[["sysname"]],
      Windows = "^tbb.*\\.dll$",
      Darwin  = "^libtbb.*\\.dylib$",
      "^libtbb.*\\.so.*$"
   )

   # WASM only supports static libraries
   if (R.version$os == "emscripten") {
      shlibPattern <- "^libtbb.*\\.a$"
   }

   tbbFiles <- list.files(
      file.path(getwd(), "tbb/build-tbb"),
      pattern = shlibPattern,
      recursive = TRUE,
      full.names = TRUE
   )

   dir.create("tbb/build/lib_release", recursive = TRUE, showWarnings = FALSE)
   file.copy(tbbFiles, "tbb/build/lib_release", overwrite = TRUE)
   unlink("tbb/build-tbb", recursive = TRUE)
   writeLines("*** finished building tbb")

}

getenv <- function(key, unset = "") {
   Sys.getenv(key, unset = unset)
}


setenv <- function(key, value) {
   args <- list(paste(value, collapse = " "))
   names(args) <- key
   do.call(Sys.setenv, args)
}


# CMake doesn't support flags specified directly as part of the compiler
# definition, so manually split it here.
splitCompilerVar <- function(compilerVar, flagsVar) {

   compiler <- Sys.getenv(compilerVar, unset = NA)
   if (is.na(compiler))
      return(FALSE)

   tokens <- scan(text = compiler, what = character(), quiet = TRUE)
   if (length(tokens) < 2L)
      return(FALSE)

   setenv(compilerVar, tokens[[1L]])

   oldFlags <- Sys.getenv(flagsVar)
   newFlags <- c(tokens[-1L], oldFlags)
   setenv(flagsVar, newFlags[nzchar(newFlags)])

   TRUE

}


# Given an environment variable like 'CC', forward that to CMake
# via the corresponding CMAKE_C_COMPILER flag.
forwardEnvVar <- function(envVar, cmakeVar) {
   envVal <- Sys.getenv(envVar, unset = NA)
   if (!is.na(envVal)) {
      sprintf("-D%s=%s", cmakeVar, envVal)
   }
}

prependFlags <- function(prependFlags, toFlags) {

   prependVal <- Sys.getenv(prependFlags, unset = NA)
   if (is.na(prependVal))
      return(FALSE)

   oldVal <- Sys.getenv(toFlags, unset = NA)
   if (is.na(oldVal)) {
      setenv(toFlags, prependVal)
   } else {
      setenv(toFlags, paste(prependVal, oldVal))
   }

   TRUE

}

# Main ----

tbbLib <- Sys.getenv("TBB_LIB")
tbbInc <- Sys.getenv("TBB_INC")

args <- commandArgs(trailingOnly = TRUE)
if (identical(args, "build")) {
   if (nzchar(tbbLib) && nzchar(tbbInc)) {
      useSystemTbb(tbbLib, tbbInc)
   } else if (.Platform$OS.type == "windows") {
      writeLines("** building RcppParallel without tbb backend")
   } else {
      useBundledTbb()
   }
} else {
   source("../R/tbb-autodetected.R")
   .install.libs(tbbLib)
}


================================================
FILE: src/options.cpp
================================================

#include <RcppParallel.h>

#include <Rinternals.h>

#if RCPP_PARALLEL_USE_TBB // TBB support turned on

#include <string>
#include <exception>

extern "C" SEXP defaultNumThreads() {
   SEXP threadsSEXP = Rf_allocVector(INTSXP, 1);
#ifdef __TBB_task_arena_H
   INTEGER(threadsSEXP)[0] = tbb::this_task_arena::max_concurrency();
#else
   INTEGER(threadsSEXP)[0] = tbb::task_scheduler_init::default_num_threads();
#endif
   return threadsSEXP;
}

#else // TBB support not turned on

#include <tthread/tinythread.h>

extern "C" SEXP defaultNumThreads() {
   SEXP threadsSEXP = Rf_allocVector(INTSXP, 1);
   INTEGER(threadsSEXP)[0] = tthread::thread::hardware_concurrency();
   return threadsSEXP;
}

#endif


================================================
FILE: src/tbb/.gitignore
================================================
# -------- C++ --------
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.so.*
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# -------- CMake --------
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
build/*

# -------- Python --------
__pycache__/
*.py[cod]
*$py.class

# -------- IDE --------
.vscode/*
.vs/*
out/*
CMakeSettings.json

# -------- CTags --------
.tags
.ctags



================================================
FILE: src/tbb/CMakeLists.txt
================================================
# Copyright (c) 2020-2024 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.

cmake_minimum_required(VERSION 3.5)

# Enable CMake policies

if (POLICY CMP0068)
    # RPATH settings do not affect install_name on macOS since CMake 3.9
    cmake_policy(SET CMP0068 NEW)
endif()

if (POLICY CMP0091)
    # The NEW behavior for this policy is to not place MSVC runtime library flags in the default
    # CMAKE_<LANG>_FLAGS_<CONFIG> cache entries and use CMAKE_MSVC_RUNTIME_LIBRARY abstraction instead.
    cmake_policy(SET CMP0091 NEW)
elseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
    message(FATAL_ERROR "CMAKE_MSVC_RUNTIME_LIBRARY was defined while policy CMP0091 is not available. Use CMake 3.15 or newer.")
endif()

if (TBB_WINDOWS_DRIVER AND (NOT ("${CMAKE_MSVC_RUNTIME_LIBRARY}" STREQUAL MultiThreaded OR "${CMAKE_MSVC_RUNTIME_LIBRARY}" STREQUAL MultiThreadedDebug)))
    message(FATAL_ERROR "Enabled TBB_WINDOWS_DRIVER requires CMAKE_MSVC_RUNTIME_LIBRARY to be set to MultiThreaded or MultiThreadedDebug.")
endif()

# Enable support of minimum supported macOS version flag
if (APPLE)
    if (NOT CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG)
        set(CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=" CACHE STRING "Minimum macOS version flag")
    endif()
    if (NOT CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG)
        set(CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=" CACHE STRING "Minimum macOS version flag")
    endif()
endif()

file(READ include/oneapi/tbb/version.h _tbb_version_info)
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_version_info}")
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_version_info}")
string(REGEX REPLACE ".*#define TBB_VERSION_PATCH ([0-9]+).*" "\\1" _tbb_ver_patch "${_tbb_version_info}")
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_version_info}")
string(REGEX REPLACE ".*#define __TBB_BINARY_VERSION ([0-9]+).*" "\\1" TBB_BINARY_VERSION "${_tbb_version_info}")
string(REGEX REPLACE "..(..)." "\\1" TBB_BINARY_MINOR_VERSION "${TBB_INTERFACE_VERSION}")
set(TBBMALLOC_BINARY_VERSION 2)
set(TBBBIND_BINARY_VERSION 3)

project(TBB VERSION ${_tbb_ver_major}.${_tbb_ver_minor}.${_tbb_ver_patch} LANGUAGES CXX)
unset(_tbb_ver_major)
unset(_tbb_ver_minor)

include(CheckCXXCompilerFlag)
include(GNUInstallDirs)
include(CMakeDependentOption)

# ---------------------------------------------------------------------------------------------------------
# Handle C++ standard version.
if (NOT MSVC)  # no need to cover MSVC as it uses C++14 by default.
    if (NOT CMAKE_CXX_STANDARD)
        set(CMAKE_CXX_STANDARD 11)
    endif()

    if (CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)  # if standard option was detected by CMake
        set(CMAKE_CXX_STANDARD_REQUIRED ON)
    else()  # if standard option wasn't detected by CMake (e.g. for Intel Compiler with CMake 3.1)
        # TBB_CXX_STD_FLAG should be added to targets via target_compile_options
        set(TBB_CXX_STD_FLAG -std=c++${CMAKE_CXX_STANDARD})

        check_cxx_compiler_flag(${TBB_CXX_STD_FLAG} c++${CMAKE_CXX_STANDARD})
        if (NOT c++${CMAKE_CXX_STANDARD})
            message(FATAL_ERROR "C++${CMAKE_CXX_STANDARD} (${TBB_CXX_STD_FLAG}) support is required")
        endif()
        unset(c++${CMAKE_CXX_STANDARD})
    endif()
endif()

set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++... instead of -std=gnu++...
# ---------------------------------------------------------------------------------------------------------

# Detect architecture (bitness).
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
    set(TBB_ARCH 32)
else()
    set(TBB_ARCH 64)
endif()

option(TBB_TEST "Enable testing" ON)
option(TBB_EXAMPLES "Enable examples" OFF)
option(TBB_STRICT "Treat compiler warnings as errors" ON)
option(TBB_WINDOWS_DRIVER "Build as Universal Windows Driver (UWD)" OFF)
option(TBB_NO_APPCONTAINER "Apply /APPCONTAINER:NO (for testing binaries for Windows Store)" OFF)
option(TBB4PY_BUILD "Enable tbb4py build" OFF)
option(TBB_BUILD "Enable tbb build" ON)
option(TBBMALLOC_BUILD "Enable tbbmalloc build" ON)
cmake_dependent_option(TBBMALLOC_PROXY_BUILD "Enable tbbmalloc_proxy build" ON "TBBMALLOC_BUILD" OFF)
option(TBB_CPF "Enable preview features of the library" OFF)
option(TBB_FIND_PACKAGE "Enable search for external oneTBB using find_package instead of build from sources" OFF)
option(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH "Disable HWLOC automatic search by pkg-config tool" ${CMAKE_CROSSCOMPILING})
option(TBB_ENABLE_IPO "Enable Interprocedural Optimization (IPO) during the compilation" ON)
option(TBB_FUZZ_TESTING "Enable fuzz testing" OFF)
option(TBB_INSTALL "Enable installation" ON)
if(LINUX)
option(TBB_LINUX_SEPARATE_DBG "Enable separation of the debug symbols during the build" OFF)
endif()
if(APPLE)
option(TBB_BUILD_APPLE_FRAMEWORKS "Build as Apple Frameworks" OFF)
endif()

if (NOT DEFINED BUILD_SHARED_LIBS)
    set(BUILD_SHARED_LIBS ON)
endif()

if (NOT BUILD_SHARED_LIBS)
    if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
        set(CMAKE_POSITION_INDEPENDENT_CODE ON)
    endif()
    message(WARNING "You are building oneTBB as a static library. This is highly discouraged and such configuration is not supported. Consider building a dynamic library to avoid unforeseen issues.")
endif()

if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
    set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE)
    message(STATUS "CMAKE_BUILD_TYPE is not specified. Using default: ${CMAKE_BUILD_TYPE}")
    # Possible values of build type for cmake-gui
    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

if (CMAKE_BUILD_TYPE)
    string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type)
    if (_tbb_build_type STREQUAL "debug")
        set(TBB_ENABLE_IPO OFF)
    endif()
    unset(_tbb_build_type)
endif()

# -------------------------------------------------------------------
# Files and folders naming
set(CMAKE_DEBUG_POSTFIX _debug)

if (NOT DEFINED TBB_OUTPUT_DIR_BASE)
    if (MSVC)
        if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY OR CMAKE_MSVC_RUNTIME_LIBRARY MATCHES DLL)
            set(_tbb_msvc_runtime _md)
        else()
            set(_tbb_msvc_runtime _mt)
        endif()

        if (WINDOWS_STORE)
            if (TBB_NO_APPCONTAINER)
                set(_tbb_win_store _wsnoappcont)
            else()
                set(_tbb_win_store _ws)
            endif()
        elseif(TBB_WINDOWS_DRIVER)
            set(_tbb_win_store _wd)
        endif()
    endif()

     string(REGEX MATCH "^([0-9]+\.[0-9]+|[0-9]+)" _tbb_compiler_version_short ${CMAKE_CXX_COMPILER_VERSION})
     string(TOLOWER ${CMAKE_CXX_COMPILER_ID}_${_tbb_compiler_version_short}_cxx${CMAKE_CXX_STANDARD}_${TBB_ARCH}${_tbb_msvc_runtime}${_tbb_win_store} TBB_OUTPUT_DIR_BASE)
     unset(_tbb_msvc_runtime)
     unset(_tbb_win_store)
     unset(_tbb_compiler_version_short)
endif()

foreach(output_type LIBRARY ARCHIVE PDB RUNTIME)
    if (CMAKE_BUILD_TYPE)
        string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type_lower)
        set(CMAKE_${output_type}_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_${_tbb_build_type_lower})
        unset(_tbb_build_type_lower)
    endif()

    if (CMAKE_CONFIGURATION_TYPES)
        foreach(suffix ${CMAKE_CONFIGURATION_TYPES})
            string(TOUPPER ${suffix} _tbb_suffix_upper)
            string(TOLOWER ${suffix} _tbb_suffix_lower)
            set(CMAKE_${output_type}_OUTPUT_DIRECTORY_${_tbb_suffix_upper} ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_${_tbb_suffix_lower})
        endforeach()
        unset(_tbb_suffix_lower)
        unset(_tbb_suffix_upper)
    endif()
endforeach()

if (CMAKE_CONFIGURATION_TYPES)
    # We can't use generator expressions in a cmake variable name.
    set(TBB_TEST_WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_$<LOWER_CASE:$<CONFIG>>)
else()
    set(TBB_TEST_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()

# -------------------------------------------------------------------

# -------------------------------------------------------------------
# Common dependencies
#force -pthread during compilation for Emscripten
if (EMSCRIPTEN AND NOT EMSCRIPTEN_WITHOUT_PTHREAD)
   set(THREADS_HAVE_PTHREAD_ARG TRUE)
endif()

set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
# -------------------------------------------------------------------

file(GLOB FILES_WITH_EXTRA_TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake)
foreach(FILE_WITH_EXTRA_TARGETS ${FILES_WITH_EXTRA_TARGETS})
    include(${FILE_WITH_EXTRA_TARGETS})
endforeach()

# - Enabling LTO on Android causes the NDK bug.
#   NDK throws the warning: "argument unused during compilation: '-Wa,--noexecstack'"
# - For some reason GCC does not instrument code with Thread Sanitizer when lto is enabled and C linker is used.
if (TBB_ENABLE_IPO AND BUILD_SHARED_LIBS AND NOT ANDROID_PLATFORM AND NOT TBB_SANITIZE MATCHES "thread")
    if (NOT CMAKE_VERSION VERSION_LESS 3.9)
        cmake_policy(SET CMP0069 NEW)
        include(CheckIPOSupported)
        check_ipo_supported(RESULT TBB_IPO_PROPERTY)
    else()
        set(TBB_IPO_FLAGS TRUE)
    endif()
    if (TBB_IPO_PROPERTY OR TBB_IPO_FLAGS)
        message(STATUS "IPO enabled")
    endif()
endif()

set(TBB_COMPILER_SETTINGS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compilers/${CMAKE_CXX_COMPILER_ID}.cmake)
if (EXISTS ${TBB_COMPILER_SETTINGS_FILE})
    include(${TBB_COMPILER_SETTINGS_FILE})
else()
    message(WARNING "TBB compiler settings not found ${TBB_COMPILER_SETTINGS_FILE}")
endif()

if (TBB_FIND_PACKAGE AND TBB_DIR)
    # Allow specifying external TBB to test with.
    # Do not add main targets and installation instructions in that case.
    message(STATUS "Using external TBB for testing")
    find_package(TBB REQUIRED)
else()
    if (TBB_BUILD)
        add_subdirectory(src/tbb)
    endif()
    if (TBBMALLOC_BUILD)
        add_subdirectory(src/tbbmalloc)
        if(TBBMALLOC_PROXY_BUILD AND NOT "${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "ARM64")
            add_subdirectory(src/tbbmalloc_proxy)
        endif()
    endif()
    if (NOT BUILD_SHARED_LIBS)
        message(STATUS "TBBBind build targets are disabled due to unsupported environment")
    else()
        add_subdirectory(src/tbbbind)
    endif()
    if (TBB_INSTALL)
        # -------------------------------------------------------------------
        # Installation instructions
        include(CMakePackageConfigHelpers)

        install(DIRECTORY include/
                DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
                COMPONENT devel)

        install(EXPORT ${PROJECT_NAME}Targets
                NAMESPACE TBB::
                DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
                COMPONENT devel)
        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
                   "include(\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake)\n")
        if (NOT BUILD_SHARED_LIBS)
            file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
                       "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n")
        endif()

        write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
                                         COMPATIBILITY AnyNewerVersion)

        install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
                      "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
                DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
                COMPONENT devel)

        install(FILES "README.md"
                DESTINATION ${CMAKE_INSTALL_DOCDIR}
                COMPONENT devel)
        # -------------------------------------------------------------------
    endif()
endif()

if (TBB_TEST)
    enable_testing()
    add_subdirectory(test)
endif()

if (TBB_EXAMPLES)
    add_subdirectory(examples)
endif()

if (TBB_BENCH)
    if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/benchmark)
        message(FATAL_ERROR "Benchmarks are not supported yet")
    endif()

    enable_testing()
    add_subdirectory(benchmark)
endif()

if (ANDROID_PLATFORM)
    if ("${ANDROID_STL}" STREQUAL "c++_shared")
        if (${ANDROID_NDK_MAJOR} GREATER_EQUAL "25")
            if(ANDROID_ABI STREQUAL "arm64-v8a")
                set(ANDROID_TOOLCHAIN_NAME "aarch64-linux-android")
            elseif(ANDROID_ABI STREQUAL "x86_64")
                set(ANDROID_TOOLCHAIN_NAME "x86_64-linux-android")
            elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
                set(ANDROID_TOOLCHAIN_NAME "arm-linux-androideabi")
            elseif(ANDROID_ABI STREQUAL "x86")
                set(ANDROID_TOOLCHAIN_NAME "i686-linux-android")
            endif()

            configure_file(
            "${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${ANDROID_TOOLCHAIN_NAME}/libc++_shared.so"
            "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so"
            COPYONLY)
        else()
            configure_file(
                "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_ABI}/libc++_shared.so"
                "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so"
                COPYONLY)
        endif()
    endif()
    # This custom target may be implemented without separate CMake script, but it requires
    # ADB(Android Debug Bridge) executable file availability, so to incapsulate this requirement
    # only for corresponding custom target, it was implemented by this way.
    add_custom_target(device_environment_cleanup COMMAND ${CMAKE_COMMAND}
                      -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/android/device_environment_cleanup.cmake)
endif()

if (TBB4PY_BUILD)
    add_subdirectory(python)
endif()

# Keep it the last instruction.
add_subdirectory(cmake/post_install)


================================================
FILE: src/tbb/CODEOWNERS
================================================
# Where component owners are known, add them here.

/oneTBB/src/tbb/ @pavelkumbrasev
/oneTBB/src/tbb/ @dnmokhov
/oneTBB/src/tbb/ @JhaShweta1
/oneTBB/src/tbb/ @sarathnandu
/oneTBB/include/oneapi/tbb/parallel_* @pavelkumbrasev
/oneTBB/include/oneapi/tbb/concurrent_* @kboyarinov
/oneTBB/include/oneapi/tbb/flow_graph* @kboyarinov
/oneTBB/include/oneapi/tbb/flow_graph* @aleksei-fedotov
/oneTBB/include/oneapi/tbb/detail/_flow_graph* @kboyarinov
/oneTBB/include/oneapi/tbb/detail/_flow_graph* @aleksei-fedotov
/oneTBB/include/oneapi/tbb/detail/_concurrent* @kboyarinov
/oneTBB/src/doc @aepanchi
/oneTBB/src/tbbbind/ @isaevil
/oneTBB/src/tbbmalloc/ @lplewa
/oneTBB/src/tbbmalloc_proxy/ @lplewa
/oneTBB/cmake/ @isaevil
/oneTBB/*CMakeLists.txt @isaevil
/oneTBB/python/ @sarathnandu
/oneTBB/python/ @isaevil

# Bazel build related files.
/oneTBB/.bazelversion @Vertexwahn
/oneTBB/Bazel.md @Vertexwahn
/oneTBB/BUILD.bazel @Vertexwahn
/oneTBB/MODULE.bazel @Vertexwahn


================================================
FILE: src/tbb/CODE_OF_CONDUCT.md
================================================

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
  community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
  any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
  without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
oneTBBCodeOfConduct At intel DOT com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations



================================================
FILE: src/tbb/CONTRIBUTING.md
================================================
<!--
******************************************************************************
* 
* 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.
*******************************************************************************/-->

# How to Contribute
As an open source project, we welcome community contributions to oneAPI Threading Building Blocks (oneTBB).  This document explains how to participate in project conversations, log bugs and enhancement requests, and submit code patches to the project. 

## Licensing 

Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. The oneTBB project uses the [Apache 2.0 License](https://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt), a permissive open source license that allows you to freely use, modify, and distribute your own products that include Apache 2.0 licensed software. By contributing to the oneTBB project, you agree to the license and copyright terms therein and release your own contributions under these terms. 

Some imported or reused components within oneTBB use other licenses, as described in [third-party-programs.txt](https://github.com/oneapi-src/oneTBB/blob/master/third-party-programs.txt). By carefully reviewing potential contributions, we can ensure that the community can develop products with oneTBB without concerns over patent or copyright issues. 

## Prerequisites 

As a contributor, you’ll want to be familiar with the oneTBB project and the repository layout. You should also know how to use it as explained in the [oneTBB documentation](https://oneapi-src.github.io/oneTBB/) and how to set up your build development environment to configure, build, and test oneTBB as explained in the [oneTBB Build System Description](cmake/README.md). 

## Pull Requests 

You can find all [open oneTBB pull requests](https://github.com/oneapi-src/oneTBB/pulls) on GitHub. 
 
### Before contributing changes directly to the oneTBB repository

* Make sure you can build the product and run all the tests with your patch. 
* For a larger feature, provide a relevant test. 
* Document your code. The oneTBB project uses reStructuredText for documentation.  
* Update the copyright year in the first line of the changing file(s). 
  For example, if you commit your changes in 2022:
  * the copyright year should be `2005-2022` for existing files
  * the copyright year should be `2022` for new files
* Submit a pull request into the master branch. You can submit changes with a pull request (preferred) or by sending an email patch.  

Continuous Integration (CI) testing is enabled for the repository. Your pull request must pass all checks before it can be merged. We will review your contribution and may provide feedback to guide you if any additional fixes or modifications are necessary. When reviewed and accepted, your pull request will be merged into our GitHub repository. 


================================================
FILE: src/tbb/INSTALL.md
================================================
# Installation from Sources


## Prerequisites 
   
   - Make sure you have installed CMake version 3.1 (or newer) on your system. oneTBB uses CMake build configuration.
   - Configure and build oneTBB. To work with build configurations, see [Build System Description](cmake/README.md). 


## Configure oneTBB

At the command prompt, type:
```
cmake <options> <repo_root>
```

You may want to use some additional options for configuration:

| Option                    | Purpose                   | Description                                                                        |
| ------                    |------                     | ------                                                                             |
| `-G <generator>`          | Specify project generator | For more information, run cmake `–help`.                                           |
|`-DCMAKE_BUILD_TYPE=Debug` | Specify for Debug build   | Not applicable for multi-configuration generators such as Visual Studio generator. |


## Build oneTBB
 
To build the system, run:
```
cmake --build . <options>
```

Some useful build options:
- `--target <target>` - specific target, "all" is default.
-	`--config <Release|Debug>` - build configuration, applicable only for multi-config generators such as Visual Studio generator.


## Install and Pack oneTBB

---
**NOTE**

Be careful about installing prefix. It defaults to `/usr/local` on UNIX* and `c:/Program Files/${PROJECT_NAME}` on Windows* OS.
You can define custom `CMAKE_INSTALL_PREFIX` during configuration:

```
cmake -DCMAKE_INSTALL_PREFIX=/my/install/prefix ..
```

---

Installation can also be done using:

```
cmake --install <project-binary-dir>
```

Special ``--install`` target can alternatively be used for installation, e.g. ``make install``.

You can use the ``install`` components for partial installation.

The following install components are supported:
- `runtime` - oneTBB runtime package (core shared libraries and `.dll` files on Windows* OS).
- `devel` - oneTBB development package (header files, CMake integration files, library symbolic links, and `.lib` files on Windows* OS).
- `tbb4py` - [oneTBB Module for Python](https://github.com/oneapi-src/oneTBB/blob/master/python/README.md).

If you want to install specific components after configuration and build, run:

```bash
cmake -DCOMPONENT=<component> [-DBUILD_TYPE=<build-type>] -P cmake_install.cmake
```

Simple packaging using CPack is supported.
The following commands allow you to create a simple portable package that includes header files, libraries, and integration files for CMake:

```bash
cmake <options> ..
cpack
```

## Installation from vcpkg

You can download and install oneTBB using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
```sh
  git clone https://github.com/Microsoft/vcpkg.git
  cd vcpkg
  ./bootstrap-vcpkg.sh #.\bootstrap-vcpkg.bat(for Windows)
  ./vcpkg integrate install
  ./vcpkg install tbb
```

The oneTBB port in vcpkg is kept up to date by Microsoft* team members and community contributors. If the version is out of date, create an issue or pull request on the [vcpkg repository](https://github.com/Microsoft/vcpkg).

## Example of Installation

### Single-configuration generators

The following example demonstrates how to install oneTBB for single-configuration generators (e.g. GNU Make, Ninja, etc.).
```bash
# Do our experiments in /tmp
cd /tmp
# Clone oneTBB repository
git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB
# Create binary directory for out-of-source build
mkdir build && cd build
# Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
cmake -DCMAKE_INSTALL_PREFIX=/tmp/my_installed_onetbb -DTBB_TEST=OFF ..
# Build
cmake --build .
# Install
cmake --install .
# Well done! Your installed oneTBB is in /tmp/my_installed_onetbb
```

### Multi-configuration generators

The following example demonstrates how to install oneTBB for multi-configuration generators such as Visual Studio*. 

Choose the configuration during the build and install steps:
```batch
REM Do our experiments in %TMP%
cd %TMP%
REM Clone oneTBB repository
git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB
REM Create binary directory for out-of-source build
mkdir build && cd build
REM Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
cmake -DCMAKE_INSTALL_PREFIX=%TMP%\my_installed_onetbb -DTBB_TEST=OFF ..
REM Build "release with debug information" configuration 
cmake --build . --config relwithdebinfo
REM Install "release with debug information" configuration 
cmake --install . --config relwithdebinfo
REM Well done! Your installed oneTBB is in %TMP%\my_installed_onetbb
```


================================================
FILE: src/tbb/LICENSE.txt
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, pro
Download .txt
gitextract_0_xjhq3b/

├── .Rbuildignore
├── .gitattributes
├── .github/
│   ├── .gitignore
│   └── workflows/
│       └── R-CMD-check.yaml
├── .gitignore
├── DESCRIPTION
├── NAMESPACE
├── NEWS.md
├── R/
│   ├── RcppParallel-package.R
│   ├── aaa.R
│   ├── flags.R
│   ├── options.R
│   ├── platform.R
│   ├── plugin.R
│   ├── skeleton.R
│   ├── tbb-autodetected.R.in
│   ├── tbb.R
│   ├── utils.R
│   └── zzz.R
├── README.md
├── RcppParallel.Rproj
├── cleanup
├── cleanup.win
├── configure
├── configure.win
├── doc/
│   └── rtools_tbb_notes.md
├── inst/
│   ├── .gitignore
│   ├── include/
│   │   ├── .gitignore
│   │   ├── RcppParallel/
│   │   │   ├── Backend.h
│   │   │   ├── Common.h
│   │   │   ├── RMatrix.h
│   │   │   ├── RVector.h
│   │   │   ├── TBB.h
│   │   │   ├── Timer.h
│   │   │   └── TinyThread.h
│   │   ├── RcppParallel.h
│   │   └── tthread/
│   │       ├── fast_mutex.h
│   │       ├── tinythread.h
│   │       └── tinythread.inl
│   ├── presentations/
│   │   ├── .gitignore
│   │   └── rcpp_parallel_talk_jan2015.Rmd
│   ├── rstudio/
│   │   └── templates/
│   │       └── project/
│   │           └── RcppParallel.package.skeleton.dcf
│   ├── skeleton/
│   │   ├── vector-sum.Rd
│   │   └── vector-sum.cpp
│   └── tests/
│       ├── cpp/
│       │   ├── distance.cpp
│       │   ├── innerproduct.cpp
│       │   ├── sum.cpp
│       │   ├── transform.cpp
│       │   └── truefalse_macros.cpp
│       ├── runit.distance.R
│       ├── runit.innerproduct.R
│       ├── runit.sum.R
│       ├── runit.transform.R
│       └── runit.truefalse_macros.R
├── man/
│   ├── RcppParallel-package.Rd
│   ├── RcppParallel.package.skeleton.Rd
│   ├── flags.Rd
│   ├── setThreadOptions.Rd
│   └── tbbLibraryPath.Rd
├── patches/
│   └── windows_arm64.diff
├── src/
│   ├── .gitignore
│   ├── Makevars.in
│   ├── init.cpp
│   ├── install.libs.R
│   ├── options.cpp
│   ├── tbb/
│   │   ├── .gitignore
│   │   ├── CMakeLists.txt
│   │   ├── CODEOWNERS
│   │   ├── CODE_OF_CONDUCT.md
│   │   ├── CONTRIBUTING.md
│   │   ├── INSTALL.md
│   │   ├── LICENSE.txt
│   │   ├── README.md
│   │   ├── RELEASE_NOTES.md
│   │   ├── SECURITY.md
│   │   ├── SUPPORT.md
│   │   ├── SYSTEM_REQUIREMENTS.md
│   │   ├── WASM_Support.md
│   │   ├── cmake/
│   │   │   ├── README.md
│   │   │   ├── android/
│   │   │   │   ├── device_environment_cleanup.cmake
│   │   │   │   ├── environment.cmake
│   │   │   │   └── test_launcher.cmake
│   │   │   ├── compilers/
│   │   │   │   ├── AppleClang.cmake
│   │   │   │   ├── Clang.cmake
│   │   │   │   ├── GNU.cmake
│   │   │   │   ├── Intel.cmake
│   │   │   │   ├── IntelLLVM.cmake
│   │   │   │   ├── MSVC.cmake
│   │   │   │   └── QCC.cmake
│   │   │   ├── config_generation.cmake
│   │   │   ├── hwloc_detection.cmake
│   │   │   ├── memcheck.cmake
│   │   │   ├── packaging.cmake
│   │   │   ├── post_install/
│   │   │   │   └── CMakeLists.txt
│   │   │   ├── python/
│   │   │   │   └── test_launcher.cmake
│   │   │   ├── resumable_tasks.cmake
│   │   │   ├── sanitize.cmake
│   │   │   ├── scripts/
│   │   │   │   └── cmake_gen_github_configs.cmake
│   │   │   ├── suppressions/
│   │   │   │   ├── lsan.suppressions
│   │   │   │   └── tsan.suppressions
│   │   │   ├── templates/
│   │   │   │   ├── TBBConfig.cmake.in
│   │   │   │   └── TBBConfigVersion.cmake.in
│   │   │   ├── test_spec.cmake
│   │   │   ├── toolchains/
│   │   │   │   ├── mips.cmake
│   │   │   │   └── riscv64.cmake
│   │   │   ├── utils.cmake
│   │   │   └── vars_utils.cmake
│   │   ├── include/
│   │   │   ├── oneapi/
│   │   │   │   ├── tbb/
│   │   │   │   │   ├── blocked_range.h
│   │   │   │   │   ├── blocked_range2d.h
│   │   │   │   │   ├── blocked_range3d.h
│   │   │   │   │   ├── blocked_rangeNd.h
│   │   │   │   │   ├── cache_aligned_allocator.h
│   │   │   │   │   ├── collaborative_call_once.h
│   │   │   │   │   ├── combinable.h
│   │   │   │   │   ├── concurrent_hash_map.h
│   │   │   │   │   ├── concurrent_lru_cache.h
│   │   │   │   │   ├── concurrent_map.h
│   │   │   │   │   ├── concurrent_priority_queue.h
│   │   │   │   │   ├── concurrent_queue.h
│   │   │   │   │   ├── concurrent_set.h
│   │   │   │   │   ├── concurrent_unordered_map.h
│   │   │   │   │   ├── concurrent_unordered_set.h
│   │   │   │   │   ├── concurrent_vector.h
│   │   │   │   │   ├── detail/
│   │   │   │   │   │   ├── _aggregator.h
│   │   │   │   │   │   ├── _aligned_space.h
│   │   │   │   │   │   ├── _allocator_traits.h
│   │   │   │   │   │   ├── _assert.h
│   │   │   │   │   │   ├── _attach.h
│   │   │   │   │   │   ├── _concurrent_queue_base.h
│   │   │   │   │   │   ├── _concurrent_skip_list.h
│   │   │   │   │   │   ├── _concurrent_unordered_base.h
│   │   │   │   │   │   ├── _config.h
│   │   │   │   │   │   ├── _containers_helpers.h
│   │   │   │   │   │   ├── _exception.h
│   │   │   │   │   │   ├── _export.h
│   │   │   │   │   │   ├── _flow_graph_body_impl.h
│   │   │   │   │   │   ├── _flow_graph_cache_impl.h
│   │   │   │   │   │   ├── _flow_graph_impl.h
│   │   │   │   │   │   ├── _flow_graph_indexer_impl.h
│   │   │   │   │   │   ├── _flow_graph_item_buffer_impl.h
│   │   │   │   │   │   ├── _flow_graph_join_impl.h
│   │   │   │   │   │   ├── _flow_graph_node_impl.h
│   │   │   │   │   │   ├── _flow_graph_node_set_impl.h
│   │   │   │   │   │   ├── _flow_graph_nodes_deduction.h
│   │   │   │   │   │   ├── _flow_graph_tagged_buffer_impl.h
│   │   │   │   │   │   ├── _flow_graph_trace_impl.h
│   │   │   │   │   │   ├── _flow_graph_types_impl.h
│   │   │   │   │   │   ├── _hash_compare.h
│   │   │   │   │   │   ├── _intrusive_list_node.h
│   │   │   │   │   │   ├── _machine.h
│   │   │   │   │   │   ├── _mutex_common.h
│   │   │   │   │   │   ├── _namespace_injection.h
│   │   │   │   │   │   ├── _node_handle.h
│   │   │   │   │   │   ├── _pipeline_filters.h
│   │   │   │   │   │   ├── _pipeline_filters_deduction.h
│   │   │   │   │   │   ├── _range_common.h
│   │   │   │   │   │   ├── _rtm_mutex.h
│   │   │   │   │   │   ├── _rtm_rw_mutex.h
│   │   │   │   │   │   ├── _scoped_lock.h
│   │   │   │   │   │   ├── _segment_table.h
│   │   │   │   │   │   ├── _small_object_pool.h
│   │   │   │   │   │   ├── _string_resource.h
│   │   │   │   │   │   ├── _task.h
│   │   │   │   │   │   ├── _task_handle.h
│   │   │   │   │   │   ├── _template_helpers.h
│   │   │   │   │   │   ├── _utils.h
│   │   │   │   │   │   └── _waitable_atomic.h
│   │   │   │   │   ├── enumerable_thread_specific.h
│   │   │   │   │   ├── flow_graph.h
│   │   │   │   │   ├── flow_graph_abstractions.h
│   │   │   │   │   ├── global_control.h
│   │   │   │   │   ├── info.h
│   │   │   │   │   ├── memory_pool.h
│   │   │   │   │   ├── mutex.h
│   │   │   │   │   ├── null_mutex.h
│   │   │   │   │   ├── null_rw_mutex.h
│   │   │   │   │   ├── parallel_for.h
│   │   │   │   │   ├── parallel_for_each.h
│   │   │   │   │   ├── parallel_invoke.h
│   │   │   │   │   ├── parallel_pipeline.h
│   │   │   │   │   ├── parallel_reduce.h
│   │   │   │   │   ├── parallel_scan.h
│   │   │   │   │   ├── parallel_sort.h
│   │   │   │   │   ├── partitioner.h
│   │   │   │   │   ├── profiling.h
│   │   │   │   │   ├── queuing_mutex.h
│   │   │   │   │   ├── queuing_rw_mutex.h
│   │   │   │   │   ├── rw_mutex.h
│   │   │   │   │   ├── scalable_allocator.h
│   │   │   │   │   ├── spin_mutex.h
│   │   │   │   │   ├── spin_rw_mutex.h
│   │   │   │   │   ├── task.h
│   │   │   │   │   ├── task_arena.h
│   │   │   │   │   ├── task_group.h
│   │   │   │   │   ├── task_scheduler_observer.h
│   │   │   │   │   ├── tbb_allocator.h
│   │   │   │   │   ├── tbbmalloc_proxy.h
│   │   │   │   │   ├── tick_count.h
│   │   │   │   │   └── version.h
│   │   │   │   └── tbb.h
│   │   │   └── tbb/
│   │   │       ├── blocked_range.h
│   │   │       ├── blocked_range2d.h
│   │   │       ├── blocked_range3d.h
│   │   │       ├── blocked_rangeNd.h
│   │   │       ├── cache_aligned_allocator.h
│   │   │       ├── collaborative_call_once.h
│   │   │       ├── combinable.h
│   │   │       ├── concurrent_hash_map.h
│   │   │       ├── concurrent_lru_cache.h
│   │   │       ├── concurrent_map.h
│   │   │       ├── concurrent_priority_queue.h
│   │   │       ├── concurrent_queue.h
│   │   │       ├── concurrent_set.h
│   │   │       ├── concurrent_unordered_map.h
│   │   │       ├── concurrent_unordered_set.h
│   │   │       ├── concurrent_vector.h
│   │   │       ├── enumerable_thread_specific.h
│   │   │       ├── flow_graph.h
│   │   │       ├── flow_graph_abstractions.h
│   │   │       ├── global_control.h
│   │   │       ├── info.h
│   │   │       ├── memory_pool.h
│   │   │       ├── mutex.h
│   │   │       ├── null_mutex.h
│   │   │       ├── null_rw_mutex.h
│   │   │       ├── parallel_for.h
│   │   │       ├── parallel_for_each.h
│   │   │       ├── parallel_invoke.h
│   │   │       ├── parallel_pipeline.h
│   │   │       ├── parallel_reduce.h
│   │   │       ├── parallel_scan.h
│   │   │       ├── parallel_sort.h
│   │   │       ├── partitioner.h
│   │   │       ├── profiling.h
│   │   │       ├── queuing_mutex.h
│   │   │       ├── queuing_rw_mutex.h
│   │   │       ├── rw_mutex.h
│   │   │       ├── scalable_allocator.h
│   │   │       ├── spin_mutex.h
│   │   │       ├── spin_rw_mutex.h
│   │   │       ├── task.h
│   │   │       ├── task_arena.h
│   │   │       ├── task_group.h
│   │   │       ├── task_scheduler_observer.h
│   │   │       ├── tbb.h
│   │   │       ├── tbb_allocator.h
│   │   │       ├── tbbmalloc_proxy.h
│   │   │       ├── tick_count.h
│   │   │       └── version.h
│   │   ├── integration/
│   │   │   ├── cmake/
│   │   │   │   └── generate_vars.cmake
│   │   │   ├── linux/
│   │   │   │   ├── env/
│   │   │   │   │   ├── vars.sh
│   │   │   │   │   └── vars.sh.in
│   │   │   │   ├── modulefiles/
│   │   │   │   │   ├── tbb
│   │   │   │   │   └── tbb32
│   │   │   │   ├── oneapi/
│   │   │   │   │   └── vars.sh
│   │   │   │   └── sys_check/
│   │   │   │       └── sys_check.sh
│   │   │   ├── mac/
│   │   │   │   └── env/
│   │   │   │       ├── vars.sh
│   │   │   │       └── vars.sh.in
│   │   │   ├── pkg-config/
│   │   │   │   └── tbb.pc.in
│   │   │   └── windows/
│   │   │       ├── env/
│   │   │       │   ├── vars.bat
│   │   │       │   └── vars.bat.in
│   │   │       ├── nuget/
│   │   │       │   ├── inteltbb.devel.win.targets
│   │   │       │   └── inteltbb.redist.win.targets
│   │   │       ├── oneapi/
│   │   │       │   └── vars.bat
│   │   │       └── sys_check/
│   │   │           └── sys_check.bat
│   │   ├── src/
│   │   │   ├── tbb/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── address_waiter.cpp
│   │   │   │   ├── allocator.cpp
│   │   │   │   ├── arena.cpp
│   │   │   │   ├── arena.h
│   │   │   │   ├── arena_slot.cpp
│   │   │   │   ├── arena_slot.h
│   │   │   │   ├── assert_impl.h
│   │   │   │   ├── cancellation_disseminator.h
│   │   │   │   ├── co_context.h
│   │   │   │   ├── concurrent_bounded_queue.cpp
│   │   │   │   ├── concurrent_monitor.h
│   │   │   │   ├── concurrent_monitor_mutex.h
│   │   │   │   ├── def/
│   │   │   │   │   ├── lin32-tbb.def
│   │   │   │   │   ├── lin64-tbb.def
│   │   │   │   │   ├── mac64-tbb.def
│   │   │   │   │   ├── win32-tbb.def
│   │   │   │   │   └── win64-tbb.def
│   │   │   │   ├── dynamic_link.cpp
│   │   │   │   ├── dynamic_link.h
│   │   │   │   ├── environment.h
│   │   │   │   ├── exception.cpp
│   │   │   │   ├── global_control.cpp
│   │   │   │   ├── governor.cpp
│   │   │   │   ├── governor.h
│   │   │   │   ├── intrusive_list.h
│   │   │   │   ├── itt_notify.cpp
│   │   │   │   ├── itt_notify.h
│   │   │   │   ├── mailbox.h
│   │   │   │   ├── main.cpp
│   │   │   │   ├── main.h
│   │   │   │   ├── market.cpp
│   │   │   │   ├── market.h
│   │   │   │   ├── market_concurrent_monitor.h
│   │   │   │   ├── misc.cpp
│   │   │   │   ├── misc.h
│   │   │   │   ├── misc_ex.cpp
│   │   │   │   ├── observer_proxy.cpp
│   │   │   │   ├── observer_proxy.h
│   │   │   │   ├── parallel_pipeline.cpp
│   │   │   │   ├── permit_manager.h
│   │   │   │   ├── pm_client.h
│   │   │   │   ├── private_server.cpp
│   │   │   │   ├── profiling.cpp
│   │   │   │   ├── queuing_rw_mutex.cpp
│   │   │   │   ├── rml_base.h
│   │   │   │   ├── rml_tbb.cpp
│   │   │   │   ├── rml_tbb.h
│   │   │   │   ├── rml_thread_monitor.h
│   │   │   │   ├── rtm_mutex.cpp
│   │   │   │   ├── rtm_rw_mutex.cpp
│   │   │   │   ├── scheduler_common.h
│   │   │   │   ├── semaphore.cpp
│   │   │   │   ├── semaphore.h
│   │   │   │   ├── small_object_pool.cpp
│   │   │   │   ├── small_object_pool_impl.h
│   │   │   │   ├── task.cpp
│   │   │   │   ├── task_dispatcher.cpp
│   │   │   │   ├── task_dispatcher.h
│   │   │   │   ├── task_group_context.cpp
│   │   │   │   ├── task_stream.h
│   │   │   │   ├── tbb.rc
│   │   │   │   ├── tcm.h
│   │   │   │   ├── tcm_adaptor.cpp
│   │   │   │   ├── tcm_adaptor.h
│   │   │   │   ├── thread_control_monitor.h
│   │   │   │   ├── thread_data.h
│   │   │   │   ├── thread_dispatcher.cpp
│   │   │   │   ├── thread_dispatcher.h
│   │   │   │   ├── thread_dispatcher_client.h
│   │   │   │   ├── thread_request_serializer.cpp
│   │   │   │   ├── thread_request_serializer.h
│   │   │   │   ├── threading_control.cpp
│   │   │   │   ├── threading_control.h
│   │   │   │   ├── threading_control_client.h
│   │   │   │   ├── tls.h
│   │   │   │   ├── tools_api/
│   │   │   │   │   ├── disable_warnings.h
│   │   │   │   │   ├── ittnotify.h
│   │   │   │   │   ├── ittnotify_config.h
│   │   │   │   │   ├── ittnotify_static.c
│   │   │   │   │   ├── ittnotify_static.h
│   │   │   │   │   ├── ittnotify_types.h
│   │   │   │   │   └── legacy/
│   │   │   │   │       └── ittnotify.h
│   │   │   │   ├── version.cpp
│   │   │   │   └── waiters.h
│   │   │   ├── tbbbind/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── def/
│   │   │   │   │   ├── lin32-tbbbind.def
│   │   │   │   │   ├── lin64-tbbbind.def
│   │   │   │   │   ├── mac64-tbbbind.def
│   │   │   │   │   ├── win32-tbbbind.def
│   │   │   │   │   └── win64-tbbbind.def
│   │   │   │   ├── tbb_bind.cpp
│   │   │   │   └── tbb_bind.rc
│   │   │   ├── tbbmalloc/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── Customize.h
│   │   │   │   ├── MapMemory.h
│   │   │   │   ├── Statistics.h
│   │   │   │   ├── Synchronize.h
│   │   │   │   ├── TypeDefinitions.h
│   │   │   │   ├── backend.cpp
│   │   │   │   ├── backend.h
│   │   │   │   ├── backref.cpp
│   │   │   │   ├── def/
│   │   │   │   │   ├── lin32-tbbmalloc.def
│   │   │   │   │   ├── lin64-tbbmalloc.def
│   │   │   │   │   ├── mac64-tbbmalloc.def
│   │   │   │   │   ├── win32-tbbmalloc.def
│   │   │   │   │   └── win64-tbbmalloc.def
│   │   │   │   ├── frontend.cpp
│   │   │   │   ├── large_objects.cpp
│   │   │   │   ├── large_objects.h
│   │   │   │   ├── shared_utils.h
│   │   │   │   ├── tbbmalloc.cpp
│   │   │   │   ├── tbbmalloc.rc
│   │   │   │   ├── tbbmalloc_internal.h
│   │   │   │   └── tbbmalloc_internal_api.h
│   │   │   └── tbbmalloc_proxy/
│   │   │       ├── CMakeLists.txt
│   │   │       ├── def/
│   │   │       │   ├── lin32-proxy.def
│   │   │       │   └── lin64-proxy.def
│   │   │       ├── function_replacement.cpp
│   │   │       ├── function_replacement.h
│   │   │       ├── proxy.cpp
│   │   │       ├── proxy.h
│   │   │       ├── proxy_overload_osx.h
│   │   │       └── tbbmalloc_proxy.rc
│   │   └── third-party-programs.txt
│   ├── tbb-compat/
│   │   └── tbb-compat.cpp
│   └── tbb.cpp
├── tests/
│   └── doRUnit.R
└── tools/
    ├── config/
    │   ├── cleanup.R
    │   └── configure.R
    ├── config.R
    └── tbb/
        ├── disable-pragmas.R
        ├── fix-memset.R
        └── update-tbb.R
Download .txt
Showing preview only (227K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2106 symbols across 203 files)

FILE: inst/include/RcppParallel.h
  function namespace (line 28) | namespace RcppParallel {

FILE: inst/include/RcppParallel/Backend.h
  function namespace (line 12) | namespace RcppParallel {

FILE: inst/include/RcppParallel/Common.h
  function namespace (line 13) | namespace RcppParallel {

FILE: inst/include/RcppParallel/RMatrix.h
  function namespace (line 7) | namespace RcppParallel {
  function reference (line 91) | inline reference operator*() { return start_[index_ * parentNrow_]; }
  function pointer (line 93) | inline pointer operator->() { return &(start_[index_ * parentNrow_]); }
  function reference (line 95) | inline reference operator[](int i) { return start_[(index_+i) * parentNr...
  type row_iterator (line 103) | typedef row_iterator<T> iterator;
  type row_iterator (line 104) | typedef row_iterator<const T> const_iterator;
  function T (line 142) | inline T& operator[](std::size_t i) {
  function T (line 146) | inline const T& operator[](std::size_t i) const {
  function class (line 155) | class Column {
  type T (line 201) | typedef T* iterator;
  type T (line 202) | typedef const T* const_iterator;
  function iterator (line 218) | inline iterator end() { return data_ + length(); }
  function length (line 223) | inline std::size_t length() const { return nrow_ * ncol_; }
  function T (line 228) | inline T& operator()(std::size_t i, std::size_t j) {
  function T (line 232) | inline const T& operator()(std::size_t i, std::size_t j) const {
  function Row (line 236) | inline Row row(std::size_t i) {
  function Row (line 240) | inline const Row row(std::size_t i) const {
  function Column (line 244) | inline Column column(std::size_t i) {
  function Column (line 248) | inline const Column column(std::size_t i) const {
  function T (line 252) | inline T& operator[](std::size_t i) {
  function T (line 256) | inline const T& operator[](std::size_t i) const {

FILE: inst/include/RcppParallel/RVector.h
  function namespace (line 6) | namespace RcppParallel {

FILE: inst/include/RcppParallel/TBB.h
  function namespace (line 23) | namespace tbb {
  function namespace (line 52) | namespace RcppParallel {
  function const (line 110) | void operator()(std::size_t begin, std::size_t end) const
  function join (line 126) | void join(const ReducerWrapper& rhs) const

FILE: inst/include/RcppParallel/Timer.h
  function namespace (line 4) | namespace RcppParallel {
  function operator (line 47) | inline operator SEXP(){
  function step (line 53) | inline void step( const char* name ){
  function ProportionTimer (line 72) | inline ProportionTimer<Timer>& operator[](int i){
  function operator (line 76) | inline operator SEXP(){
  function operator (line 114) | inline operator SEXP(){
  function join (line 183) | inline void join(const TimedReducer& rhs){

FILE: inst/include/RcppParallel/TinyThread.h
  function namespace (line 14) | namespace RcppParallel {

FILE: inst/include/tthread/fast_mutex.h
  function lock (line 120) | inline void lock()

FILE: inst/include/tthread/tinythread.h
  function class (line 160) | class mutex {
  function class (line 252) | class recursive_mutex {
  function explicit (line 351) | explicit lock_guard(mutex_type &aMutex)
  function class (line 393) | class condition_variable {
  function class (line 482) | class thread {
  function namespace (line 729) | namespace tthread {

FILE: inst/skeleton/vector-sum.cpp
  type Sum (line 21) | struct Sum : public Worker
    method Sum (line 30) | Sum(const NumericVector input) : input(input), value(0) {}
    method Sum (line 31) | Sum(const Sum& sum, Split) : input(sum.input), value(0) {}
    method join (line 39) | void join(const Sum& rhs) {
  function parallelVectorSum (line 45) | double parallelVectorSum(NumericVector x) {

FILE: inst/tests/cpp/distance.cpp
  function kl_divergence (line 15) | inline double kl_divergence(InputIterator1 begin1, InputIterator1 end1,
  function average (line 40) | inline double average(double val1, double val2) {
  function NumericMatrix (line 45) | NumericMatrix rcpp_js_distance(NumericMatrix mat) {
  type JsDistance (line 80) | struct JsDistance : public Worker {
    method JsDistance (line 90) | JsDistance(const NumericMatrix mat, NumericMatrix rmat)
  function NumericMatrix (line 121) | NumericMatrix rcpp_parallel_js_distance(NumericMatrix mat) {

FILE: inst/tests/cpp/innerproduct.cpp
  function innerProduct (line 13) | double innerProduct(NumericVector x, NumericVector y) {
  type InnerProduct (line 21) | struct InnerProduct : public Worker
    method InnerProduct (line 31) | InnerProduct(const NumericVector x, const NumericVector y)
    method InnerProduct (line 33) | InnerProduct(const InnerProduct& innerProduct, Split)
    method join (line 45) | void join(const InnerProduct& rhs) {
  function parallelInnerProduct (line 51) | double parallelInnerProduct(NumericVector x, NumericVector y) {

FILE: inst/tests/cpp/sum.cpp
  type Sum (line 14) | struct Sum : public Worker
    method Sum (line 23) | Sum(const NumericVector input) : input(input), value(0) {}
    method Sum (line 24) | Sum(const Sum& sum, Split) : input(sum.input), value(0) {}
    method join (line 32) | void join(const Sum& rhs) {
  function parallelVectorSum (line 38) | double parallelVectorSum(NumericVector x) {
  function vectorSum (line 51) | double vectorSum(NumericVector x) {

FILE: inst/tests/cpp/transform.cpp
  function squareRoot (line 13) | double squareRoot(double x) {
  function NumericMatrix (line 18) | NumericMatrix matrixSqrt(NumericMatrix orig) {
  type SquareRoot (line 33) | struct SquareRoot : public Worker
    method SquareRoot (line 42) | SquareRoot(const NumericMatrix input, NumericMatrix output)
  function NumericMatrix (line 55) | NumericMatrix parallelMatrixSqrt(NumericMatrix x) {

FILE: inst/tests/cpp/truefalse_macros.cpp
  function hush_no_export_warning (line 29) | int hush_no_export_warning() {

FILE: src/init.cpp
  function R_init_RcppParallel (line 15) | void R_init_RcppParallel(DllInfo *dll)

FILE: src/options.cpp
  function SEXP (line 11) | SEXP defaultNumThreads() {
  function SEXP (line 25) | SEXP defaultNumThreads() {

FILE: src/tbb-compat/tbb-compat.cpp
  type tbb (line 17) | namespace tbb {
    type interface6 (line 19) | namespace interface6 {
      class task_scheduler_observer (line 20) | class task_scheduler_observer
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
      class task_scheduler_observer (line 75) | class task_scheduler_observer : public internal::task_scheduler_obse...
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
    type internal (line 23) | namespace internal {
      class task_scheduler_observer_v3 (line 25) | class task_scheduler_observer_v3 {
        method is_observing (line 46) | bool is_observing() const {return my_proxy!=NULL;}
        method task_scheduler_observer_v3 (line 49) | task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.stor...
        method on_scheduler_entry (line 58) | virtual void on_scheduler_entry( bool /*is_worker*/ ) {}
        method on_scheduler_exit (line 65) | virtual void on_scheduler_exit( bool /*is_worker*/ ) {}
      function DLL_EXPORT (line 136) | DLL_EXPORT
    type interface6 (line 73) | namespace interface6 {
      class task_scheduler_observer (line 20) | class task_scheduler_observer
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
      class task_scheduler_observer (line 75) | class task_scheduler_observer : public internal::task_scheduler_obse...
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
    type internal (line 134) | namespace internal {
      class task_scheduler_observer_v3 (line 25) | class task_scheduler_observer_v3 {
        method is_observing (line 46) | bool is_observing() const {return my_proxy!=NULL;}
        method task_scheduler_observer_v3 (line 49) | task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.stor...
        method on_scheduler_entry (line 58) | virtual void on_scheduler_entry( bool /*is_worker*/ ) {}
        method on_scheduler_exit (line 65) | virtual void on_scheduler_exit( bool /*is_worker*/ ) {}
      function DLL_EXPORT (line 136) | DLL_EXPORT
  type tbb (line 133) | namespace tbb {
    type interface6 (line 19) | namespace interface6 {
      class task_scheduler_observer (line 20) | class task_scheduler_observer
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
      class task_scheduler_observer (line 75) | class task_scheduler_observer : public internal::task_scheduler_obse...
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
    type internal (line 23) | namespace internal {
      class task_scheduler_observer_v3 (line 25) | class task_scheduler_observer_v3 {
        method is_observing (line 46) | bool is_observing() const {return my_proxy!=NULL;}
        method task_scheduler_observer_v3 (line 49) | task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.stor...
        method on_scheduler_entry (line 58) | virtual void on_scheduler_entry( bool /*is_worker*/ ) {}
        method on_scheduler_exit (line 65) | virtual void on_scheduler_exit( bool /*is_worker*/ ) {}
      function DLL_EXPORT (line 136) | DLL_EXPORT
    type interface6 (line 73) | namespace interface6 {
      class task_scheduler_observer (line 20) | class task_scheduler_observer
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
      class task_scheduler_observer (line 75) | class task_scheduler_observer : public internal::task_scheduler_obse...
        method task_scheduler_observer (line 100) | explicit task_scheduler_observer( bool local = false ) {
        method task_scheduler_observer (line 108) | explicit task_scheduler_observer( task_arena & a) {
        method observe (line 120) | void observe( bool state=true ) {
    type internal (line 134) | namespace internal {
      class task_scheduler_observer_v3 (line 25) | class task_scheduler_observer_v3 {
        method is_observing (line 46) | bool is_observing() const {return my_proxy!=NULL;}
        method task_scheduler_observer_v3 (line 49) | task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.stor...
        method on_scheduler_entry (line 58) | virtual void on_scheduler_entry( bool /*is_worker*/ ) {}
        method on_scheduler_exit (line 65) | virtual void on_scheduler_exit( bool /*is_worker*/ ) {}
      function DLL_EXPORT (line 136) | DLL_EXPORT

FILE: src/tbb.cpp
  type RcppParallel (line 12) | namespace RcppParallel {
    type TBBWorker (line 18) | struct TBBWorker
      method TBBWorker (line 20) | explicit TBBWorker(Worker& worker) : worker_(worker) {}
    class TBBParallelForExecutor (line 54) | class TBBParallelForExecutor
      method TBBParallelForExecutor (line 58) | TBBParallelForExecutor(Worker& worker,
    class TBBArenaParallelForExecutor (line 85) | class TBBArenaParallelForExecutor
      method TBBArenaParallelForExecutor (line 89) | TBBArenaParallelForExecutor(tbb::task_group& group,
    function tbbParallelFor (line 117) | void tbbParallelFor(std::size_t begin,
    type TBBReducer (line 135) | struct TBBReducer
      method TBBReducer (line 137) | explicit TBBReducer(ReducerWrapper& reducer)
      method TBBReducer (line 142) | TBBReducer(TBBReducer& tbbReducer, tbb::split)
      method join (line 155) | void join(const TBBReducer& tbbReducer)
    class TBBParallelReduceExecutor (line 165) | class TBBParallelReduceExecutor
      method TBBParallelReduceExecutor (line 169) | TBBParallelReduceExecutor(ReducerWrapper& reducer,
    class TBBArenaParallelReduceExecutor (line 196) | class TBBArenaParallelReduceExecutor
      method TBBArenaParallelReduceExecutor (line 200) | TBBArenaParallelReduceExecutor(tbb::task_group& group,
    function tbbParallelReduceImpl (line 228) | void tbbParallelReduceImpl(std::size_t begin,

FILE: src/tbb/include/oneapi/tbb/blocked_range.h
  function namespace (line 27) | namespace tbb {
  function namespace (line 161) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/blocked_range2d.h
  function namespace (line 28) | namespace tbb {
  function namespace (line 106) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/blocked_range3d.h
  function namespace (line 27) | namespace tbb {
  function namespace (line 125) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/blocked_rangeNd.h
  function namespace (line 35) | namespace tbb {
  function namespace (line 141) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/cache_aligned_allocator.h
  function namespace (line 29) | namespace tbb {
  function namespace (line 180) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/collaborative_call_once.h
  function namespace (line 25) | namespace tbb {
  function class (line 152) | class collaborative_once_flag : no_copy {

FILE: src/tbb/include/oneapi/tbb/combinable.h
  function namespace (line 25) | namespace tbb {
  function namespace (line 62) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_hash_map.h
  function namespace (line 38) | namespace tbb {
  function delete_segment (line 217) | void delete_segment( segment_index_type s ) {
  function bucket (line 240) | bucket *get_bucket( hashcode_type h ) const noexcept {
  function mark_rehashed_levels (line 249) | void mark_rehashed_levels( hashcode_type h ) noexcept {
  function check_mask_race (line 260) | inline bool check_mask_race( const hashcode_type h, hashcode_type &m ) c...
  function check_rehashing_collision (line 270) | bool check_rehashing_collision( const hashcode_type h, hashcode_type m_o...
  function segment_index_type (line 288) | segment_index_type insert_new_node( bucket *b, node_base *n, hashcode_ty...
  function reserve (line 305) | void reserve(size_type buckets) {
  function internal_swap_content (line 316) | void internal_swap_content(hash_map_base &table) {
  function internal_move (line 335) | void internal_move(hash_map_base&& other) {
  function advance_to_next_bucket (line 438) | void advance_to_next_bucket() { // TODO?: refactor to iterator_base class
  function pointer (line 646) | pointer storage() { return &my_value; }
  function delete_node (line 654) | void delete_node( node_base *n ) {
  function guard (line 665) | auto guard = make_raii_guard([&] {
  function node (line 676) | static node* allocate_node_copy_construct(bucket_allocator_type& allocat...
  function node (line 680) | static node* allocate_node_move_construct(bucket_allocator_type& allocat...
  function class (line 706) | class bucket_accessor : public bucket::scoped_type {
  function bucket (line 724) | bucket *operator() () { return my_b; }
  function rehash_bucket (line 728) | void rehash_bucket( bucket *b_new, const hashcode_type hash ) {
  function class (line 771) | class const_accessor : private node::scoped_type /*which derived from no...
  function class (line 818) | class accessor: public const_accessor {
  function concurrent_hash_map (line 840) | concurrent_hash_map(hash_compare_type()) {}
  function explicit (line 842) | explicit concurrent_hash_map( const allocator_type& a )
  function concurrent_hash_map (line 860) | concurrent_hash_map( const concurrent_hash_map &table )
  function concurrent_hash_map (line 871) | concurrent_hash_map(a)
  function concurrent_hash_map (line 889) | concurrent_hash_map(a)
  function concurrent_hash_map (line 898) | concurrent_hash_map(a)
  function clear (line 1008) | void clear() {
  function iterator (line 1046) | iterator begin() { return iterator( *this, 0, this->my_embedded_segment,...
  function iterator (line 1049) | iterator end() { return iterator( *this, 0, nullptr, nullptr ); }
  function size_type (line 1074) | size_type max_size() const {
  function allocator_type (line 1082) | allocator_type get_allocator() const { return base_type::get_allocator(); }
  function size_type (line 1097) | size_type count( const Key &key ) const {
  function find (line 1109) | bool find( const_accessor &result, const Key &key ) const {
  function find (line 1116) | bool find( accessor &result, const Key &key ) {
  function insert (line 1137) | bool insert( const_accessor &result, const Key &key ) {
  function insert (line 1144) | bool insert( accessor &result, const Key &key ) {
  function insert (line 1167) | bool insert( const_accessor &result, const value_type &value ) {
  function insert (line 1174) | bool insert( accessor &result, const value_type &value ) {
  function insert (line 1181) | bool insert( const value_type &value ) {
  function insert (line 1187) | bool insert( const_accessor &result, value_type && value ) {
  function insert (line 1193) | bool insert( accessor &result, value_type && value ) {
  function insert (line 1199) | bool insert( value_type && value ) {
  function insert (line 1232) | void insert( std::initializer_list<value_type> il ) {
  function erase (line 1238) | bool erase( const Key &key ) {
  function erase (line 1250) | bool erase( const_accessor& item_accessor ) {
  function erase (line 1256) | bool erase( accessor& item_accessor ) {
  type accessor_not_used (line 1359) | struct accessor_not_used { void release(){}};
  function friend (line 1363) | friend bool is_write_access_needed( accessor const& )           { return...
  function friend (line 1364) | friend bool is_write_access_needed( const_accessor const& )     { return...
  function friend (line 1365) | friend bool is_write_access_needed( accessor_not_used const& )  { return...
  function exclude (line 1381) | bool exclude( const_accessor &item_accessor ) {
  function internal_copy (line 1486) | void internal_copy( const concurrent_hash_map& source ) {
  function internal_move_construct_with_allocator (line 1524) | void internal_move_construct_with_allocator( concurrent_hash_map&& other...
  function internal_move_construct_with_allocator (line 1530) | void internal_move_construct_with_allocator( concurrent_hash_map&& other...
  function internal_move_assign (line 1545) | void internal_move_assign( concurrent_hash_map&& other,
  function internal_move_assign (line 1551) | void internal_move_assign(concurrent_hash_map&& other, /*is_always_equal...
  function internal_swap (line 1561) | void internal_swap(concurrent_hash_map& other, /*is_always_equal || POCS...
  function internal_swap (line 1565) | void internal_swap(concurrent_hash_map& other, /*is_always_equal || POCS...
  function const_pointer (line 1573) | const_pointer internal_fast_find( const Key& key ) const {
  function namespace (line 1656) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_lru_cache.h
  function namespace (line 33) | namespace tbb {
  function namespace (line 367) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_map.h
  function namespace (line 27) | namespace tbb {
  function namespace (line 341) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_priority_queue.h
  function namespace (line 36) | namespace tbb {
  function assign (line 159) | void assign( std::initializer_list<value_type> init ) {
  function push (line 173) | void push( const value_type& value ) {
  function push (line 181) | void push( value_type&& value ) {
  function try_pop (line 199) | bool try_pop( value_type& value ) {
  function clear (line 206) | void clear() {
  function swap (line 213) | void swap( concurrent_priority_queue& other ) {
  type operation_type (line 227) | enum operation_type {INVALID_OP, PUSH_OP, POP_OP, PUSH_RVALUE_OP}
  type operation_status (line 228) | enum operation_status {WAIT = 0, SUCCEEDED, FAILED}
  function class (line 230) | class cpq_operation : public aggregated_operation<cpq_operation> {
  function class (line 241) | class functor {
  function handle_operations (line 253) | void handle_operations( cpq_operation* op_list ) {
  function heapify (line 344) | void heapify() {
  function reheap (line 363) | void reheap() {
  function push_back_helper (line 383) | void push_back_helper( const T& value ) {
  function push_back_helper_impl (line 387) | void push_back_helper_impl( const T& value, /*is_copy_constructible = */...
  function push_back_helper_impl (line 391) | void push_back_helper_impl( const T&, /*is_copy_constructible = */std::f...
  function namespace (line 484) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_queue.h
  function namespace (line 27) | namespace tbb {
  function internal_pop (line 600) | void internal_pop( void* dst ) {
  function internal_pop_if_present (line 628) | bool internal_pop_if_present( void* dst ) {
  function internal_abort (line 639) | void internal_abort() {
  function copy_construct_item (line 644) | static void copy_construct_item(T* location, const void* src) {
  function move_construct_item (line 649) | static void move_construct_item(T* location, const void* src) {
  function namespace (line 690) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_set.h
  function namespace (line 26) | namespace tbb {
  function namespace (line 258) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_unordered_map.h
  function namespace (line 25) | namespace tbb {
  function namespace (line 405) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_unordered_set.h
  function namespace (line 24) | namespace tbb {
  function namespace (line 324) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/concurrent_vector.h
  function namespace (line 36) | namespace tbb {
  function explicit (line 283) | explicit concurrent_vector( const allocator_type& alloc ) noexcept
  function explicit (line 287) | explicit concurrent_vector( size_type count, const value_type& value,
  function concurrent_vector (line 299) | concurrent_vector(alloc)
  function concurrent_vector (line 310) | concurrent_vector(alloc)
  function base_type (line 319) | concurrent_vector( const concurrent_vector& other )
  function noexcept (line 353) | noexcept(is_noexcept_assignment) {
  function assign (line 363) | void assign( size_type count, const value_type& value ) {
  function assign (line 375) | void assign( std::initializer_list<value_type> init ) {
  function iterator (line 381) | iterator grow_by( size_type delta ) {
  function iterator (line 385) | iterator grow_by( size_type delta, const value_type& value ) {
  function iterator (line 396) | iterator grow_by( std::initializer_list<value_type> init ) {
  function iterator (line 400) | iterator grow_to_at_least( size_type n ) {
  function iterator (line 403) | iterator grow_to_at_least( size_type n, const value_type& value ) {
  function iterator (line 407) | iterator push_back( const value_type& item ) {
  function iterator (line 411) | iterator push_back( value_type&& item ) {
  function reference (line 421) | reference operator[]( size_type index ) {
  function const_reference (line 424) | const_reference operator[]( size_type index ) const {
  function reference (line 428) | reference at( size_type index ) {
  function const_reference (line 431) | const_reference at( size_type index ) const {
  function reference (line 445) | reference front() {
  function reference (line 453) | reference back() {
  function iterator (line 462) | iterator begin() { return iterator(*this, 0); }
  function iterator (line 466) | iterator end() { return iterator(*this, size()); }
  function reverse_iterator (line 470) | reverse_iterator rbegin() { return reverse_iterator(end()); }
  function const_reverse_iterator (line 471) | const_reverse_iterator rbegin() const { return const_reverse_iterator(en...
  function reverse_iterator (line 474) | reverse_iterator rend() { return reverse_iterator(begin()); }
  function allocator_type (line 478) | allocator_type get_allocator() const {
  function size_type (line 487) | size_type size() const noexcept {
  function size_type (line 495) | size_type capacity() const noexcept {
  function resize (line 510) | void resize( size_type n ) {
  function resize (line 514) | void resize( size_type n, const value_type& val ) {
  function shrink_to_fit (line 518) | void shrink_to_fit() {
  function swap (line 522) | void swap(concurrent_vector& other) noexcept(is_noexcept_swap) {
  function clear (line 526) | void clear() {
  function segment_table_type (line 540) | segment_table_type allocate_long_table( const typename base_type::atomic...
  function segment_type (line 569) | segment_type create_segment( segment_table_type table, segment_index_typ...
  function size_type (line 632) | size_type number_of_elements_in_segment( segment_index_type seg_index ) {
  function segment_type (line 647) | segment_type nullify_segment( segment_table_type table, size_type segmen...
  function deallocate_segment (line 662) | void deallocate_segment( segment_type address, segment_index_type seg_in...
  function destroy_segment (line 675) | void destroy_segment( segment_type address, segment_index_type seg_index...
  function copy_segment (line 687) | void copy_segment( segment_index_type seg_index, segment_type from, segm...
  function move_segment (line 710) | void move_segment( segment_index_type seg_index, segment_type from, segm...
  function is_first_element_in_segment (line 732) | static constexpr bool is_first_element_in_segment( size_type index ) {
  function const_reference (line 737) | const_reference internal_subscript( size_type index ) const {
  function reference (line 741) | reference internal_subscript( size_type index ) {
  function const_reference (line 746) | const_reference internal_subscript_with_exceptions( size_type index ) co...
  function reference (line 750) | reference internal_subscript_with_exceptions( size_type index ) {
  function zero_unconstructed_elements (line 769) | static void zero_unconstructed_elements( pointer start, size_type count ) {
  function value_guard (line 781) | auto value_guard = make_raii_guard([&] {
  function value_guard (line 797) | auto value_guard = make_raii_guard( [&] {
  function destroy_elements (line 933) | void destroy_elements() {
  function incompact_predicate (line 941) | static bool incompact_predicate( size_type size ) {
  function internal_compact (line 947) | void internal_compact() {
  function namespace (line 1123) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/detail/_aggregator.h
  function namespace (line 28) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_aligned_space.h
  function namespace (line 23) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_allocator_traits.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_assert.h
  function namespace (line 23) | namespace rml { namespace internal {

FILE: src/tbb/include/oneapi/tbb/detail/_attach.h
  function namespace (line 22) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_concurrent_queue_base.h
  function namespace (line 31) | namespace tbb {
  function invalidate_page (line 263) | void invalidate_page( ticket_type k )  {
  function padded_page (line 279) | padded_page* get_head_page() {
  function clear_and_invalidate (line 308) | void clear_and_invalidate(queue_allocator_type& allocator) {
  function class (line 318) | class destroyer  {
  function copy_item (line 327) | void copy_item( padded_page& dst, size_type dindex, const padded_page& s...
  function assign_and_destroy_item (line 334) | void assign_and_destroy_item( void* dst, padded_page& src, size_type ind...
  function spin_wait_until_my_turn (line 340) | void spin_wait_until_my_turn( std::atomic<ticket_type>& counter, ticket_...
  function spin_mutex (line 357) | spin_mutex page_mutex{}
  function clear (line 434) | void clear( queue_allocator_type& alloc ) {
  function assign (line 443) | void assign( const concurrent_queue_rep& src, queue_allocator_type& allo...
  function empty (line 468) | bool empty() const {
  function std (line 499) | alignas(max_nfs_size) std::atomic<ticket_type> head_counter{}
  function std (line 500) | alignas(max_nfs_size) std::atomic<ticket_type> tail_counter{}
  function std (line 501) | alignas(max_nfs_size) std::atomic<size_type> n_invalid_entries{}
  function assign (line 530) | void assign( const concurrent_queue_iterator_base& other ) {
  function advance (line 543) | void advance() {
  function get_item (line 566) | bool get_item( Value*& item, std::size_t k ) {
  function Value (line 579) | Value* my_item{ nullptr };

FILE: src/tbb/include/oneapi/tbb/detail/_concurrent_skip_list.h
  function namespace (line 50) | namespace tbb {
  function class (line 665) | class const_range_type {
  function class (line 713) | class range_type : public const_range_type {
  function range_type (line 733) | range_type range() { return range_type(*this); }
  function internal_move (line 742) | void internal_move(concurrent_skip_list&& other) {
  function internal_move_construct_with_allocator (line 753) | void internal_move_construct_with_allocator(concurrent_skip_list&& other,
  function internal_move_construct_with_allocator (line 758) | void internal_move_construct_with_allocator(concurrent_skip_list&& other,
  function key_type (line 769) | static const key_type& get_key( node_ptr n ) {
  function fill_prev_array_for_existing_node (line 909) | void fill_prev_array_for_existing_node( array_type& prev_nodes, node_ptr...
  type not_greater_compare (line 922) | struct not_greater_compare {
  function not_greater_compare (line 933) | not_greater_compare select_comparator( /*allow_multimapping = */ std::tr...
  function key_compare (line 937) | key_compare select_comparator( /*allow_multimapping = */ std::false_type...
  function node_ptr (line 1097) | node_ptr create_node( size_type height ) {
  function value_guard (line 1107) | auto value_guard = make_raii_guard([&] {
  function node_ptr (line 1117) | node_ptr create_head_node() {
  function delete_head (line 1121) | void delete_head() {
  function delete_node (line 1129) | void delete_node( node_ptr node ) {
  function delete_value_node (line 1133) | void delete_value_node( node_ptr node ) {
  function node_ptr (line 1143) | node_ptr create_head_if_necessary() {
  function iterator (line 1161) | static iterator get_iterator( const_iterator it ) {
  function internal_move_assign (line 1165) | void internal_move_assign( concurrent_skip_list&& other, /*POCMA || is_a...
  function internal_move_assign (line 1169) | void internal_move_assign( concurrent_skip_list&& other, /*POCMA || is_a...
  function internal_swap_fields (line 1177) | void internal_swap_fields( concurrent_skip_list& other ) {
  function internal_swap (line 1188) | void internal_swap( concurrent_skip_list& other, /*POCMA || is_always_eq...
  function internal_swap (line 1192) | void internal_swap( concurrent_skip_list& other, /*POCMA || is_always_eq...

FILE: src/tbb/include/oneapi/tbb/detail/_concurrent_unordered_base.h
  function namespace (line 47) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_containers_helpers.h
  function namespace (line 26) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_exception.h
  function namespace (line 27) | namespace detail {

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_body_impl.h
  type std (line 26) | typedef std::uint64_t tag_value;
  function namespace (line 46) | namespace graph_policy_namespace {
  function Output (line 89) | Output operator()(d1::flow_control& fc) override { return body(fc); }
  function input_body_leaf (line 90) | input_body_leaf* clone() override {
  function Body (line 93) | Body get_body() { return body; }
  function Output (line 112) | Output operator()(const Input &i) override { return tbb::detail::invoke(...
  function B (line 113) | B get_body() { return body; }
  function function_body_leaf (line 114) | function_body_leaf* clone() override {
  function body (line 125) | function_body_leaf( const B &_body ) : body(_body) { }
  function continue_msg (line 126) | continue_msg operator()( const continue_msg &i ) override {
  function B (line 130) | B get_body() { return body; }
  function function_body_leaf (line 131) | function_body_leaf* clone() override {
  function body (line 142) | function_body_leaf( const B &_body ) : body(_body) { }
  function continue_msg (line 143) | continue_msg operator()(const Input &i) override {
  function B (line 147) | B get_body() { return body; }
  function function_body_leaf (line 148) | function_body_leaf* clone() override {
  function body (line 159) | function_body_leaf( const B &_body ) : body(_body) { }
  function Output (line 160) | Output operator()(const continue_msg &i) override {
  function B (line 163) | B get_body() { return body; }
  function function_body_leaf (line 164) | function_body_leaf* clone() override {
  function override (line 186) | void operator()(const Input &input, OutputSet &oset) override {
  function multifunction_body_leaf (line 190) | multifunction_body_leaf* clone() override {
  function Output (line 221) | Output operator()(const Input &i) override { return tbb::detail::invoke(...
  function type_to_key_function_body_leaf (line 222) | type_to_key_function_body_leaf* clone() override {
  function body (line 232) | type_to_key_function_body_leaf( const B &_body ) : body(_body) { }
  function Output (line 233) | const Output& operator()(const Input &i) override {
  function type_to_key_function_body_leaf (line 236) | type_to_key_function_body_leaf* clone() override {
  function graph_task (line 286) | graph_task* call_apply_body_bypass_impl(without_metainfo) {
  function graph_task (line 292) | graph_task* call_apply_body_bypass_impl(with_metainfo) {
  function graph_task (line 297) | graph_task* call_apply_body_bypass() {
  function graph_task (line 378) | graph_task* try_put_task(const DecrementType& value, const message_metai...
  function override (line 383) | const override {
  function reset_receiver (line 388) | void reset_receiver( reset_flags ) {}
  function graph_task (line 405) | graph_task* execute(const message_metainfo&) override {

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_cache_impl.h
  function empty (line 33) | bool empty() {
  function add (line 38) | void add( T &n ) {
  function remove (line 43) | void remove( T &n ) {
  function clear (line 53) | void clear() {
  function internal_empty (line 64) | inline bool internal_empty( )  {
  function size_type (line 69) | inline size_type internal_size( )  {
  function internal_push (line 74) | inline void internal_push( T &n )  {
  function T (line 79) | inline T &internal_pop() {
  type T (line 92) | typedef T output_type;
  type sender (line 93) | typedef sender<output_type> predecessor_type;
  type receiver (line 94) | typedef receiver<output_type> successor_type;
  function my_owner (line 96) | my_owner( owner ) {
  function get_item (line 144) | bool get_item( output_type& v, message_metainfo& metainfo ) {
  function reset (line 150) | void reset() {
  type T (line 170) | typedef T output_type;
  type sender (line 171) | typedef sender<T> predecessor_type;
  type receiver (line 172) | typedef receiver<T> successor_type;
  function try_reserve (line 224) | bool try_reserve( output_type& v, message_metainfo& metainfo ) {
  function try_release (line 229) | bool try_release() {
  function try_consume (line 235) | bool try_consume() {
  function reset (line 241) | void reset() {
  function clear (line 246) | void clear() {
  type receiver (line 264) | typedef receiver<T> successor_type;
  type receiver (line 265) | typedef receiver<T>* pointer_type;
  type sender (line 266) | typedef sender<T> owner_type;
  type std (line 268) | typedef std::list< pointer_type > successors_type;
  function virtual (line 278) | virtual ~successor_cache() {}
  function register_successor (line 280) | void register_successor( successor_type& r ) {
  function remove_successor (line 288) | void remove_successor( successor_type& r ) {
  function empty (line 299) | bool empty() {
  function clear (line 304) | void clear() {
  type receiver (line 322) | typedef receiver<continue_msg> successor_type;
  type receiver (line 323) | typedef receiver<continue_msg>* pointer_type;
  type sender (line 324) | typedef sender<continue_msg> owner_type;
  type std (line 325) | typedef std::list< pointer_type > successors_type;
  function virtual (line 334) | virtual ~successor_cache() {}
  function register_successor (line 336) | void register_successor( successor_type& r ) {
  function remove_successor (line 348) | void remove_successor( successor_type& r ) {
  function empty (line 361) | bool empty() {
  function clear (line 366) | void clear() {
  type M (line 380) | typedef M mutex_type;
  type typename (line 381) | typedef typename successor_cache<T,M>::successors_type successors_type;
  function graph_task (line 383) | graph_task* try_put_task_impl( const T& t __TBB_FLOW_GRAPH_METAINFO_ARG(...
  function graph_task (line 411) | graph_task* try_put_task( const T &t ) override {
  function graph_task (line 416) | graph_task* try_put_task( const T &t, const message_metainfo& metainfo )...
  function gather_successful_try_puts (line 422) | bool gather_successful_try_puts( const T &t, graph_task_list& tasks ) {
  type size_type (line 451) | typedef size_t size_type;
  type M (line 452) | typedef M mutex_type;
  type typename (line 453) | typedef typename successor_cache<T,M>::successors_type successors_type;
  function size_type (line 461) | size_type size() {
  function graph_task (line 495) | graph_task* try_put_task( const T& t, const message_metainfo& metainfo )...

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_impl.h
  function namespace (line 30) | namespace tbb {
  type tbb (line 224) | typedef tbb::concurrent_priority_queue<graph_task*, graph_task_comparato...
  function class (line 226) | class priority_task_selector : public d1::task {
  function class (line 271) | class graph_task_list : no_copy {
  function reserve_wait (line 335) | void reserve_wait() override;
  type graph_iterator (line 373) | typedef graph_iterator<graph, graph_node> iterator;
  type graph_iterator (line 374) | typedef graph_iterator<const graph, const
  function const_iterator (line 382) | const_iterator begin() const;
  function exception_thrown (line 398) | bool exception_thrown() { return caught_exception; }
  function destruct_and_deallocate (line 436) | void graph_task::destruct_and_deallocate(const d1::execution_data& ed) {
  function finalize (line 444) | void graph_task::finalize(const d1::execution_data& ed) {
  function class (line 477) | class graph_node : no_copy {
  function activate_graph (line 504) | inline void activate_graph(graph& g) {
  function deactivate_graph (line 508) | inline void deactivate_graph(graph& g) {
  function is_graph_active (line 512) | inline bool is_graph_active(graph& g) {
  function is_this_thread_in_graph_arena (line 516) | inline bool is_this_thread_in_graph_arena(graph& g) {
  function graph_task (line 521) | inline graph_task* prioritize_task(graph& g, graph_task& gt) {
  function spawn_in_graph_arena (line 538) | inline void spawn_in_graph_arena(graph& g, graph_task& arena_task) {
  function enqueue_in_graph_arena (line 556) | inline void enqueue_in_graph_arena(graph &g, graph_task& arena_task) {

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_indexer_impl.h
  function set_indexer_node_pointer (line 42) | inline void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBas...
  function set_indexer_node_pointer (line 53) | inline void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBas...
  type graph_task (line 64) | typedef graph_task* (* forward_function_ptr)(T const &, void*
  function graph_task (line 79) | graph_task* try_put_task(const T &v) override {
  function graph_task (line 84) | graph_task* try_put_task(const T& v, const message_metainfo& metainfo) o...
  function override (line 89) | const override {
  type OutputType (line 98) | typedef OutputType output_type;
  type InputTuple (line 99) | typedef InputTuple input_type;
  type OutputType (line 117) | typedef OutputType output_type;
  type StructTypes (line 118) | typedef StructTypes tuple_types;
  type typename (line 119) | typedef typename sender<output_type>::successor_type successor_type;
  type indexer_node_FE (line 120) | typedef indexer_node_FE<InputTuple, output_type,StructTypes> input_ports...
  type op_type (line 124) | enum op_type { reg_succ, rem_succ, try__put_task
  type indexer_node_base (line 126) | typedef indexer_node_base<InputTuple,output_type,StructTypes> class_type;
  function class (line 128) | class indexer_node_base_operation : public d1::aggregated_operation<inde...
  function register_successor (line 193) | bool register_successor(successor_type &r) override {
  function remove_successor (line 199) | bool remove_successor( successor_type &r) override {
  function graph_task (line 206) | graph_task* try_put_task(output_type const *v
  type tagged_msg (line 231) | typedef tagged_msg<size_t, first_type > type;
  type tagged_msg (line 238) | typedef tagged_msg<size_t, first_type, second_type> type;
  type tagged_msg (line 246) | typedef tagged_msg<size_t, first_type, second_type, third_type> type;
  type tagged_msg (line 255) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type tagged_msg (line 266) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type tagged_msg (line 278) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type tagged_msg (line 291) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type tagged_msg (line 307) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type tagged_msg (line 324) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type tagged_msg (line 341) | typedef tagged_msg<size_t, first_type, second_type, third_type,
  type typename (line 351) | typedef typename input_types<N, OutputTuple>::type output_type;
  type typename (line 352) | typedef typename wrap_tuple_elements<N,indexer_input_port,OutputTuple>::...
  type indexer_node_FE (line 353) | typedef indexer_node_FE<input_ports_type,output_type,OutputTuple> indexe...
  type indexer_node_base (line 354) | typedef indexer_node_base<input_ports_type, output_type, OutputTuple> in...
  type OutputTuple (line 361) | typedef OutputTuple tuple_types;
  type typename (line 362) | typedef typename indexer_types<OutputTuple>::output_type output_type;
  function base_type (line 367) | unfolded_indexer_node(const unfolded_indexer_node &other) : base_type(ot...

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_item_buffer_impl.h
  type buffer_item_state (line 38) | enum buffer_item_state { no_item=0, has_item=1, reserved_item=2 }
  type aligned_space_item (line 40) | struct aligned_space_item {
  type size_type (line 47) | typedef size_t size_type;
  type aligned_space (line 48) | typedef aligned_space<aligned_space_item> buffer_item_type;
  type typename (line 49) | typedef typename allocator_traits<A>::template rebind_alloc<buffer_item_...
  function aligned_space_item (line 67) | const aligned_space_item &element(size_type i) const {
  function my_item_valid (line 76) | bool my_item_valid(size_type i) const { return (i < my_tail) && (i >= my...
  function my_item_reserved (line 78) | bool my_item_reserved(size_type i) const { return element(i).state == re...
  function item_type (line 82) | const item_type &get_my_item(size_t i) const {
  function set_my_item (line 95) | void set_my_item(size_t i, const item_type &o
  function set_my_item (line 113) | void set_my_item(size_t i, const item_type& o, message_metainfo&& metain...
  function fetch_item (line 128) | void fetch_item(size_t i, item_type& o, message_metainfo& metainfo) {
  function fetch_item (line 135) | void fetch_item(size_t i, item_type &o) {
  function move_item (line 145) | void move_item(size_t to, size_t from) {
  function place_item (line 164) | bool place_item(size_t here, const item_type &me) {
  function swap_items (line 174) | void swap_items(size_t i, size_t j) {
  function destroy_item (line 187) | void destroy_item(size_type i) {
  function reserve_item (line 233) | void reserve_item(size_type i) {
  function release_item (line 238) | void release_item(size_type i) {
  function destroy_front (line 243) | void destroy_front() { destroy_item(my_head); ++my_head; }
  function destroy_back (line 244) | void destroy_back() { destroy_item(my_tail-1); --my_tail; }
  function size_type (line 249) | size_type capacity() { return my_array_size; }
  function buffer_full (line 252) | bool buffer_full() { return size() >= capacity(); }
  function grow_my_array (line 255) | void grow_my_array( size_t minimum_size ) {
  function push_back (line 286) | bool push_back(item_type& v
  function pop_back (line 297) | bool pop_back(item_type& v
  function pop_front (line 313) | bool pop_front(item_type& v
  function pop_back (line 330) | bool pop_back(item_type& v) {
  function pop_front (line 335) | bool pop_front(item_type& v) {
  function clean_up_buffer (line 343) | void clean_up_buffer(bool reset_pointers) {
  function reset (line 368) | void reset() { clean_up_buffer(/*reset_pointers*/true); grow_my_array(in...
  function reset (line 383) | void reset() {my_reserved = false; item_buffer<T,A>::reset(); }
  function reserve_front (line 396) | bool reserve_front(T& v, message_metainfo& metainfo) {
  function consume_front (line 407) | void consume_front() {
  function release_front (line 413) | void release_front() {

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_join_impl.h
  function no_assign (line 26) | struct forwarding_base : no_assign {
  function forwarding_base (line 32) | struct queueing_forwarding_base : forwarding_base {
  function forwarding_base (line 39) | struct reserving_forwarding_base : forwarding_base {
  type typename (line 51) | typedef typename std::decay<KeyType>::type current_key_type;
  function forwarding_base (line 52) | forwarding_base(g) { }
  function set_join_node_pointer (line 61) | inline void set_join_node_pointer(TupleType &my_input, PortType *port) {
  function consume_reservations (line 66) | inline void consume_reservations( TupleType &my_input ) {
  function release_my_reservation (line 72) | inline void release_my_reservation( TupleType &my_input ) {
  function release_reservations (line 77) | inline void release_reservations( TupleType &my_input) {
  function reserve (line 83) | inline bool reserve( InputTuple &my_input, OutputTuple &out) {
  function reserve (line 94) | inline bool reserve(InputTuple& my_input, OutputTuple& out, message_meta...
  function get_my_item (line 108) | inline bool get_my_item( InputTuple &my_input, OutputTuple &out) {
  function get_my_item (line 115) | inline bool get_my_item(InputTuple& my_input, OutputTuple& out, message_...
  function get_items (line 124) | inline bool get_items(InputTuple &my_input, OutputTuple &out) {
  function get_items (line 130) | inline bool get_items(InputTuple& my_input, OutputTuple& out, message_me...
  function reset_my_port (line 136) | inline void reset_my_port(InputTuple &my_input) {
  function reset_ports (line 142) | inline void reset_ports(InputTuple& my_input) {
  function set_key_functors (line 147) | inline void set_key_functors(InputTuple &my_input, KeyFuncTuple &my_key_...
  function copy_key_functors (line 154) | inline void copy_key_functors(KeyFuncTuple &my_inputs, KeyFuncTuple &oth...
  function reset_inputs (line 164) | inline void reset_inputs(InputTuple &my_input, reset_flags f) {
  type join_helper (line 171) | struct join_helper
  function set_join_node_pointer (line 174) | inline void set_join_node_pointer(TupleType &my_input, PortType *port) {
  function consume_reservations (line 179) | inline void consume_reservations( TupleType &my_input ) {
  function release_my_reservation (line 184) | inline void release_my_reservation( TupleType &my_input ) {
  function release_reservations (line 189) | inline void release_reservations( TupleType &my_input) {
  function reserve (line 194) | inline bool reserve( InputTuple &my_input, OutputTuple &out) {
  function reserve (line 200) | inline bool reserve(InputTuple& my_input, OutputTuple& out, message_meta...
  function get_my_item (line 209) | inline bool get_my_item( InputTuple &my_input, OutputTuple &out) {
  function get_my_item (line 215) | inline bool get_my_item(InputTuple& my_input, OutputTuple& out, message_...
  function get_items (line 224) | inline bool get_items(InputTuple &my_input, OutputTuple &out) {
  function get_items (line 230) | inline bool get_items(InputTuple& my_input, OutputTuple& out, message_me...
  function reset_my_port (line 236) | inline void reset_my_port(InputTuple &my_input) {
  function reset_ports (line 241) | inline void reset_ports(InputTuple& my_input) {
  function set_key_functors (line 246) | inline void set_key_functors(InputTuple &my_input, KeyFuncTuple &my_key_...
  function copy_key_functors (line 252) | inline void copy_key_functors(KeyFuncTuple &my_inputs, KeyFuncTuple &oth...
  function reset_inputs (line 260) | inline void reset_inputs(InputTuple &my_input, reset_flags f) {
  type typename (line 270) | typedef typename receiver<input_type>::predecessor_type predecessor_type;
  type op_type (line 274) | enum op_type { reg_pred, rem_pred, res_item, rel_res, con_res
  type reserving_port (line 276) | typedef reserving_port<T> class_type;
  function class (line 278) | class reserving_port_operation : public d1::aggregated_operation<reservi...
  type d1 (line 300) | typedef d1::aggregating_functor<class_type, reserving_port_operation> ha...
  function handle_operations (line 304) | void handle_operations(reserving_port_operation* op_list) {
  function graph_task (line 372) | graph_task* try_put_task( const T & ) override {
  function graph_task (line 377) | graph_task* try_put_task(const T&, const message_metainfo&) override { r...
  function override (line 380) | const override {
  function set_join_node_pointer (line 394) | void set_join_node_pointer(reserving_forwarding_base *join) {
  function register_predecessor (line 399) | bool register_predecessor( predecessor_type &src ) override {
  function remove_predecessor (line 406) | bool remove_predecessor( predecessor_type &src ) override {
  function reserve (line 413) | bool reserve( T &v ) {
  function reserve (line 420) | bool reserve( T& v, message_metainfo& metainfo ) {
  function release (line 428) | void release( ) {
  function consume (line 434) | void consume( ) {
  function reset_receiver (line 439) | void reset_receiver( reset_flags f) {
  type typename (line 462) | typedef typename receiver<input_type>::predecessor_type predecessor_type;
  type queueing_port (line 463) | typedef queueing_port<T> class_type;
  type op_type (line 467) | enum op_type { get__item, res_port, try__put_task
  function class (line 470) | class queueing_port_operation : public d1::aggregated_operation<queueing...
  type count_element (line 649) | typedef count_element<K> table_item_type;
  function K (line 650) | const K& operator()(const table_item_type& v) { return v.my_key; }
  type key_matching_port (line 672) | typedef key_matching_port<traits> class_type;
  type typename (line 673) | typedef typename TraitsType::T input_type;
  type typename (line 674) | typedef typename TraitsType::K key_type;
  type typename (line 675) | typedef typename std::decay<key_type>::type noref_key_type;
  type typename (line 676) | typedef typename receiver<input_type>::predecessor_type predecessor_type;
  type typename (line 677) | typedef typename TraitsType::TtoK type_to_key_func_type;
  type typename (line 678) | typedef typename TraitsType::KHash hash_compare_type;
  type typename (line 679) | typedef typename key_matching_port_base<key_type, input_type, type_to_ke...
  type op_type (line 684) | enum op_type { try__put, get__item, res_port
  function class (line 687) | class key_matching_port_operation : public d1::aggregated_operation<key_...
  function graph_task (line 783) | graph_task* try_put_task(const input_type& v, const message_metainfo& me...
  function override (line 788) | const override {
  function set_join_node_pointer (line 808) | void set_join_node_pointer(forwarding_base *join) {
  function set_my_key_func (line 812) | void set_my_key_func(type_to_key_func_type *f) { this->set_key_func(f); }
  function type_to_key_func_type (line 814) | type_to_key_func_type* get_my_key_func() { return this->get_key_func(); }
  function get_item (line 816) | bool get_item( input_type &v ) {
  function get_item (line 824) | bool get_item( input_type& v, message_metainfo& metainfo ) {
  function reset_port (line 834) | void reset_port() {
  function reset_receiver (line 840) | void reset_receiver(reset_flags ) {
  type OutputTuple (line 863) | typedef OutputTuple output_type;
  type InputTuple (line 864) | typedef InputTuple input_type;
  type join_node_base (line 865) | typedef join_node_base<reserving, InputTuple, OutputTuple> base_node_type;
  function set_my_node (line 877) | void set_my_node(base_node_type *new_my_node) { my_node = new_my_node; }
  function increment_port_count (line 879) | void increment_port_count() override {
  function graph_task (line 884) | graph_task* decrement_port_count() override {
  function tuple_build_may_succeed (line 908) | bool tuple_build_may_succeed() {
  function try_to_make_tuple (line 912) | bool try_to_make_tuple(output_type &out) {
  function try_to_make_tuple (line 918) | bool try_to_make_tuple(output_type &out, message_metainfo& metainfo) {
  function tuple_accepted (line 924) | void tuple_accepted() {
  function tuple_rejected (line 927) | void tuple_rejected() {
  type OutputTuple (line 940) | typedef OutputTuple output_type;
  type InputTuple (line 941) | typedef InputTuple input_type;
  type join_node_base (line 942) | typedef join_node_base<queueing, InputTuple, OutputTuple> base_node_type;
  function set_my_node (line 955) | void set_my_node(base_node_type *new_my_node) { my_node = new_my_node; }
  function reset_port_count (line 957) | void reset_port_count() {
  function graph_task (line 962) | graph_task* decrement_port_count(bool handle_task) override
  function tuple_build_may_succeed (line 988) | bool tuple_build_may_succeed() {
  function try_to_make_tuple (line 992) | bool try_to_make_tuple(output_type &out) {
  function try_to_make_tuple (line 998) | bool try_to_make_tuple(output_type &out, message_metainfo& metainfo) {
  function tuple_accepted (line 1004) | void tuple_accepted() {
  function tuple_rejected (line 1008) | void tuple_rejected() {
  type OutputTuple (line 1032) | typedef OutputTuple output_type;
  type InputTuple (line 1033) | typedef InputTuple input_type;
  type K (line 1034) | typedef K key_type;
  type typename (line 1035) | typedef typename std::decay<key_type>::type unref_key_type;
  type KHash (line 1036) | typedef KHash key_hash_compare;
  type count_element (line 1038) | typedef count_element<unref_key_type> count_element_type;
  type key_to_count_functor (line 1040) | typedef key_to_count_functor<unref_key_type> key_to_count_func;
  type type_to_key_function_body (line 1041) | typedef type_to_key_function_body< count_element_type, unref_key_type&> ...
  type type_to_key_function_body_leaf (line 1042) | typedef type_to_key_function_body_leaf<count_element_type, unref_key_typ...
  type hash_buffer (line 1045) | typedef hash_buffer< unref_key_type&, count_element_type, TtoK_function_...
  type item_buffer (line 1047) | typedef item_buffer<output_type> output_buffer_type;
  type join_node_base (line 1048) | typedef join_node_base<key_matching<key_type,key_hash_compare>, InputTup...
  type matching_forwarding_base (line 1049) | typedef matching_forwarding_base<key_type> forwarding_base_type;
  type op_type (line 1055) | enum op_type { res_count, inc_count, may_succeed, try_make }
  type join_node_FE (line 1056) | typedef join_node_FE<key_matching<key_type,key_hash_compare>, InputTuple...
  function class (line 1058) | class key_matching_FE_operation : public d1::aggregated_operation<key_ma...
  function set_my_node (line 1184) | void set_my_node(base_node_type *new_my_node) { my_node = new_my_node; }
  function reset_port_count (line 1186) | void reset_port_count() {  // called from BE
  function graph_task (line 1194) | graph_task *increment_key_count(unref_key_type const & t) override {  //...
  function tuple_build_may_succeed (line 1214) | bool tuple_build_may_succeed() {  // called from back-end
  function try_to_make_tuple (line 1222) | bool try_to_make_tuple(output_type &out) {
  function try_to_make_tuple (line 1229) | bool try_to_make_tuple(output_type &out, message_metainfo& metainfo) {
  function tuple_accepted (line 1236) | void tuple_accepted() {
  function tuple_rejected (line 1240) | void tuple_rejected() {
  type typename (line 1257) | typedef typename sender<output_type>::successor_type successor_type;
  type join_node_FE (line 1258) | typedef join_node_FE<JP, InputTuple, OutputTuple> input_ports_type;
  type op_type (line 1266) | enum op_type { reg_succ, rem_succ, try__get, do_fwrd, do_fwrd_bypass
  type join_node_base (line 1268) | typedef join_node_base<JP,InputTuple,OutputTuple> class_type;
  function class (line 1270) | class join_node_base_operation : public d1::aggregated_operation<join_no...
  type d1 (line 1293) | typedef d1::aggregating_functor<class_type, join_node_base_operation> ha...
  function handle_operations (line 1298) | void handle_operations(join_node_base_operation* op_list) {
  type join_node_base (line 1461) | typedef join_node_base<JP, typename
  type K (line 1467) | typedef K key_type;
  type KHash (line 1468) | typedef KHash key_hash_compare;
  type join_node_base (line 1469) | typedef join_node_base< key_traits_type,
  type OutputTuple (line 1483) | typedef OutputTuple output_type;
  function base_type (line 1488) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  function K (line 1494) | K operator()(const T& t) const {
  type OutputTuple (line 1516) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1519) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1520) | typedef type_to_key_function_body<T1, K> *f1_p;
  type std (line 1521) | typedef std::tuple< f0_p, f1_p > func_initializer_type;
  function base_type (line 1539) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1550) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1553) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1554) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1555) | typedef type_to_key_function_body<T2, K> *f2_p;
  type std (line 1556) | typedef std::tuple< f0_p, f1_p, f2_p > func_initializer_type;
  function base_type (line 1576) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1588) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1591) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1592) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1593) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1594) | typedef type_to_key_function_body<T3, K> *f3_p;
  type std (line 1595) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p > func_initializer_type;
  function base_type (line 1617) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1630) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1633) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1634) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1635) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1636) | typedef type_to_key_function_body<T3, K> *f3_p;
  type type_to_key_function_body (line 1637) | typedef type_to_key_function_body<T4, K> *f4_p;
  type std (line 1638) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p > func_initializer_type;
  function base_type (line 1662) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1677) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1680) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1681) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1682) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1683) | typedef type_to_key_function_body<T3, K> *f3_p;
  type type_to_key_function_body (line 1684) | typedef type_to_key_function_body<T4, K> *f4_p;
  type type_to_key_function_body (line 1685) | typedef type_to_key_function_body<T5, K> *f5_p;
  type std (line 1686) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p > func_initialize...
  function base_type (line 1712) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1729) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1732) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1733) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1734) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1735) | typedef type_to_key_function_body<T3, K> *f3_p;
  type type_to_key_function_body (line 1736) | typedef type_to_key_function_body<T4, K> *f4_p;
  type type_to_key_function_body (line 1737) | typedef type_to_key_function_body<T5, K> *f5_p;
  type type_to_key_function_body (line 1738) | typedef type_to_key_function_body<T6, K> *f6_p;
  type std (line 1739) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p > func_init...
  function base_type (line 1768) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1786) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1789) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1790) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1791) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1792) | typedef type_to_key_function_body<T3, K> *f3_p;
  type type_to_key_function_body (line 1793) | typedef type_to_key_function_body<T4, K> *f4_p;
  type type_to_key_function_body (line 1794) | typedef type_to_key_function_body<T5, K> *f5_p;
  type type_to_key_function_body (line 1795) | typedef type_to_key_function_body<T6, K> *f6_p;
  type type_to_key_function_body (line 1796) | typedef type_to_key_function_body<T7, K> *f7_p;
  type std (line 1797) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p > fun...
  function base_type (line 1828) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1847) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1850) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1851) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1852) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1853) | typedef type_to_key_function_body<T3, K> *f3_p;
  type type_to_key_function_body (line 1854) | typedef type_to_key_function_body<T4, K> *f4_p;
  type type_to_key_function_body (line 1855) | typedef type_to_key_function_body<T5, K> *f5_p;
  type type_to_key_function_body (line 1856) | typedef type_to_key_function_body<T6, K> *f6_p;
  type type_to_key_function_body (line 1857) | typedef type_to_key_function_body<T7, K> *f7_p;
  type type_to_key_function_body (line 1858) | typedef type_to_key_function_body<T8, K> *f8_p;
  type std (line 1859) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p...
  function base_type (line 1892) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
  type OutputTuple (line 1912) | typedef OutputTuple output_type;
  type type_to_key_function_body (line 1915) | typedef type_to_key_function_body<T0, K> *f0_p;
  type type_to_key_function_body (line 1916) | typedef type_to_key_function_body<T1, K> *f1_p;
  type type_to_key_function_body (line 1917) | typedef type_to_key_function_body<T2, K> *f2_p;
  type type_to_key_function_body (line 1918) | typedef type_to_key_function_body<T3, K> *f3_p;
  type type_to_key_function_body (line 1919) | typedef type_to_key_function_body<T4, K> *f4_p;
  type type_to_key_function_body (line 1920) | typedef type_to_key_function_body<T5, K> *f5_p;
  type type_to_key_function_body (line 1921) | typedef type_to_key_function_body<T6, K> *f6_p;
  type type_to_key_function_body (line 1922) | typedef type_to_key_function_body<T7, K> *f7_p;
  type type_to_key_function_body (line 1923) | typedef type_to_key_function_body<T8, K> *f8_p;
  type type_to_key_function_body (line 1924) | typedef type_to_key_function_body<T9, K> *f9_p;
  type std (line 1925) | typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p...
  function base_type (line 1960) | unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_node_impl.h
  function pop (line 43) | void pop() {
  function push (line 47) | bool push( T& t ) {
  function push (line 52) | bool push( T& t, const message_metainfo& metainfo ) {
  type op_type (line 63) | enum op_type {reg_pred, rem_pred, try_fwd, tryput_bypass, app_body_bypas...
  type function_input_base (line 65) | typedef function_input_base<Input, Policy, A, ImplType> class_type;
  type typename (line 71) | typedef typename receiver<input_type>::predecessor_type predecessor_type;
  type predecessor_cache (line 72) | typedef predecessor_cache<input_type, null_mutex > predecessor_cache_type;
  type function_input_queue (line 73) | typedef function_input_queue<input_type, A> input_queue_type;
  type typename (line 74) | typedef typename allocator_traits<A>::template rebind_alloc<input_queue_...
  function function_input_base (line 89) | function_input_base( const function_input_base& src )
  function virtual (line 96) | virtual ~function_input_base() {
  function graph_task (line 101) | graph_task* try_put_task( const input_type& t) override {
  function graph_task (line 106) | graph_task* try_put_task( const input_type& t, const message_metainfo& m...
  function register_predecessor (line 112) | bool register_predecessor( predecessor_type &src ) override {
  function remove_predecessor (line 120) | bool remove_predecessor( predecessor_type &src ) override {
  function reset_receiver (line 146) | void reset_receiver( reset_flags f) {
  function override (line 153) | const override {
  function graph_task (line 157) | graph_task* try_get_postponed_task(const input_type& i) {
  type d1 (line 197) | typedef d1::aggregating_functor<class_type, operation_type> handler_type;
  function graph_task (line 201) | graph_task* perform_queued_requests() {
  function handle_operations (line 226) | void handle_operations(operation_type *op_list) {
  function internal_try_put_task (line 268) | void internal_try_put_task(operation_type *op) {
  function internal_forward (line 288) | void internal_forward(operation_type *op) {
  function graph_task (line 300) | graph_task* internal_try_put_bypass( const input_type& t
  function graph_task (line 311) | graph_task* try_put_task_base(const input_type& t
  function graph_task (line 322) | graph_task* try_put_task_impl( const input_type& t, /*lightweight=*/std:...
  function graph_task (line 337) | graph_task* try_put_task_impl( const input_type& t, /*lightweight=*/std:...
  function graph_task (line 349) | graph_task* apply_body_bypass( const input_type &i
  function graph_task (line 361) | graph_task* create_body_task( const input_type &input )
  function graph_task (line 384) | graph_task* forward_task() {
  function graph_task (line 399) | inline graph_task* create_forward_task() {
  function spawn_forward_task (line 410) | inline void spawn_forward_task() {
  type Input (line 425) | typedef Input input_type;
  type Output (line 426) | typedef Output output_type;
  type function_body (line 427) | typedef function_body<input_type, output_type> function_body_type;
  type function_input (line 428) | typedef function_input<Input, Output, Policy,A> my_class;
  type function_input_base (line 429) | typedef function_input_base<Input, Policy, A, my_class> base_type;
  type function_input_queue (line 430) | typedef function_input_queue<input_type, A> input_queue_type;
  function output_type (line 463) | output_type apply_body_impl( const input_type& i) {
  function graph_task (line 473) | graph_task* apply_body_impl_bypass( const input_type &i
  type clear_element (line 538) | struct clear_element
  type Input (line 563) | typedef Input input_type;
  type OutputPortSet (line 564) | typedef OutputPortSet output_ports_type;
  type multifunction_body (line 565) | typedef multifunction_body<input_type, output_ports_type> multifunction_...
  type multifunction_input (line 566) | typedef multifunction_input<Input, OutputPortSet, Policy, A> my_class;
  type function_input_base (line 567) | typedef function_input_base<Input, Policy, A, my_class> base_type;
  type function_input_queue (line 568) | typedef function_input_queue<input_type, A> input_queue_type;
  function graph_task (line 601) | graph_task* apply_body_impl_bypass( const input_type &i
  function check_task_and_spawn (line 641) | inline void check_task_and_spawn(graph& g, graph_task* t) {
  type emit_element (line 672) | struct emit_element
  type Output (line 701) | typedef Output output_type;
  type function_body (line 702) | typedef function_body<input_type, output_type> function_body_type;
  type continue_input (line 703) | typedef continue_input<output_type, Policy> class_type;
  function reset_receiver (line 738) | void reset_receiver( reset_flags f) override {
  function graph_task (line 761) | graph_task* apply_body_bypass( input_type __TBB_FLOW_GRAPH_METAINFO_ARG(...
  function graph_task (line 771) | graph_task* execute(const message_metainfo& metainfo) override {
  type clear_element (line 815) | struct clear_element
  type Output (line 816) | typedef Output output_type;
  type typename (line 817) | typedef typename sender<output_type>::successor_type successor_type;
  type broadcast_cache (line 818) | typedef broadcast_cache<output_type> broadcast_cache_type;
  function register_successor (line 824) | bool register_successor( successor_type &r ) override {
  function remove_successor (line 830) | bool remove_successor( successor_type &r ) override {
  type function_output (line 847) | typedef function_output<output_type> base_type;
  function base_type (line 850) | base_type(g) {}
  function base_type (line 851) | multifunction_output(const multifunction_output& other) : base_type(othe...
  function try_put (line 853) | bool try_put(const output_type &i) {
  function graph_task (line 873) | graph_task* try_put_task(const output_type& i, const message_metainfo& m...
  type emit_element (line 878) | struct emit_element

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_node_set_impl.h
  function namespace (line 32) | namespace order {
  function class (line 38) | class get_graph_helper {
  type Order (line 62) | typedef Order order_type;
  function namespace (line 75) | namespace alias_helpers {
  function decltype (line 169) | static auto get(NodeType& node) -> decltype(get_impl(node, has_input_por...
  function decltype (line 190) | static auto get_impl(NodeType& node, std::false_type) -> decltype(intern...
  function decltype (line 204) | static auto get(NodeType& node) -> decltype(get_impl(node, is_async_node...
  type make_edges_helper (line 228) | struct make_edges_helper

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_nodes_deduction.h
  type NoInputBody (line 32) | struct NoInputBody {}

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_tagged_buffer_impl.h
  function value_type (line 39) | value_type* get_value_ptr() { return reinterpret_cast<value_type*>(this-...
  function hash_buffer_element (line 40) | hash_buffer_element* get_next() { return reinterpret_cast<hash_buffer_el...
  function set_next (line 41) | void set_next(hash_buffer_element* new_next) { this->second = reinterpre...
  function create_element (line 43) | void create_element(const value_type& v) {
  function create_element (line 47) | void create_element(hash_buffer_element&& other) {
  function destroy_element (line 51) | void destroy_element() {
  function value_type (line 62) | value_type* get_value_ptr() { return reinterpret_cast<value_type*>(this-...
  function metainfo_hash_buffer_element (line 63) | metainfo_hash_buffer_element* get_next() {
  function set_next (line 66) | void set_next(metainfo_hash_buffer_element* new_next) { this->second = r...
  function create_element (line 69) | void create_element(const value_type& v, const message_metainfo& metainf...
  function create_element (line 79) | void create_element(metainfo_hash_buffer_element&& other) {
  function destroy_element (line 85) | void destroy_element() {
  type metainfo_hash_buffer (line 360) | struct metainfo_hash_buffer

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_trace_impl.h
  function namespace (line 25) | namespace tbb {
  function fgt_node_desc (line 180) | void fgt_node_desc( const NodeType *node, const char *desc ) {
  function fgt_graph_desc (line 185) | static inline void fgt_graph_desc( const void *g, const char *desc ) {
  function fgt_body (line 190) | static inline void fgt_body( void *node, void *body ) {
  function fgt_multioutput_node (line 195) | inline void fgt_multioutput_node(void* codeptr, string_resource_index t,...
  function fgt_multioutput_node_with_body (line 202) | inline void fgt_multioutput_node_with_body( void* codeptr, string_resour...
  function fgt_multiinput_node (line 210) | inline void fgt_multiinput_node( void* codeptr, string_resource_index t,...
  function fgt_multiinput_multioutput_node (line 216) | static inline void fgt_multiinput_multioutput_node( void* codeptr, strin...
  function fgt_node (line 226) | static inline void fgt_node( void* codeptr, string_resource_index t, voi...
  function fgt_node_with_body (line 231) | static void fgt_node_with_body( void* codeptr, string_resource_index t, ...
  function fgt_node (line 237) | static inline void fgt_node( void* codeptr, string_resource_index t, voi...
  function fgt_node_with_body (line 242) | static inline void  fgt_node_with_body( void* codeptr, string_resource_i...
  function fgt_node (line 248) | static inline void  fgt_node( void* codeptr, string_resource_index t, vo...
  function fgt_make_edge (line 253) | static inline void fgt_make_edge( void *output_port, void *input_port ) {
  function fgt_remove_edge (line 257) | static inline void fgt_remove_edge( void *output_port, void *input_port ) {
  function fgt_graph (line 261) | static inline void fgt_graph( void *g ) {
  function fgt_begin_body (line 265) | static inline void fgt_begin_body( void *body ) {
  function fgt_end_body (line 269) | static inline void fgt_end_body( void * ) {
  function fgt_async_try_put_begin (line 273) | static inline void fgt_async_try_put_begin( void *node, void *port ) {
  function fgt_async_try_put_end (line 277) | static inline void fgt_async_try_put_end( void *, void * ) {
  function fgt_async_reserve (line 281) | static inline void fgt_async_reserve( void *node, void *graph ) {
  function fgt_async_commit (line 285) | static inline void fgt_async_commit( void *node, void * /*graph*/) {
  function fgt_reserve_wait (line 289) | static inline void fgt_reserve_wait( void *graph ) {
  function fgt_release_wait (line 293) | static inline void fgt_release_wait( void *graph ) {
  function fgt_alias_port (line 301) | static inline void fgt_alias_port(void * /*node*/, void * /*p*/, bool /*...
  function fgt_composite (line 303) | static inline void fgt_composite ( void* /*codeptr*/, void * /*node*/, v...
  function fgt_graph (line 305) | static inline void fgt_graph( void * /*g*/ ) { }
  function fgt_multioutput_node_desc (line 308) | inline void fgt_multioutput_node_desc( const NodeType * /*node*/, const ...
  function fgt_node_desc (line 311) | inline void fgt_node_desc( const NodeType * /*node*/, const char * /*des...
  function fgt_graph_desc (line 313) | static inline void fgt_graph_desc( const void * /*g*/, const char * /*de...
  function fgt_multioutput_node (line 316) | inline void fgt_multioutput_node( void* /*codeptr*/, string_resource_ind...
  function fgt_multioutput_node_with_body (line 319) | inline void fgt_multioutput_node_with_body( void* /*codeptr*/, string_re...
  function fgt_multiinput_node (line 322) | inline void fgt_multiinput_node( void* /*codeptr*/, string_resource_inde...
  function fgt_multiinput_multioutput_node (line 324) | static inline void fgt_multiinput_multioutput_node( void* /*codeptr*/, s...
  function fgt_node (line 326) | static inline void fgt_node( void* /*codeptr*/, string_resource_index /*...
  function fgt_node (line 327) | static inline void  fgt_node( void* /*codeptr*/, string_resource_index /...
  function fgt_node_with_body (line 329) | static inline void fgt_node_with_body( void* /*codeptr*/, string_resourc...
  function fgt_node_with_body (line 330) | static inline void fgt_node_with_body( void* /*codeptr*/, string_resourc...
  function fgt_make_edge (line 332) | static inline void fgt_make_edge( void * /*output_port*/, void * /*input...
  function fgt_remove_edge (line 333) | static inline void fgt_remove_edge( void * /*output_port*/, void * /*inp...
  function fgt_begin_body (line 335) | static inline void fgt_begin_body( void * /*body*/ ) { }
  function fgt_end_body (line 336) | static inline void fgt_end_body( void *  /*body*/) { }
  function fgt_async_try_put_begin (line 338) | static inline void fgt_async_try_put_begin( void * /*node*/, void * /*po...
  function fgt_async_try_put_end (line 339) | static inline void fgt_async_try_put_end( void * /*node*/ , void * /*por...
  function fgt_async_reserve (line 340) | static inline void fgt_async_reserve( void * /*node*/, void * /*graph*/ ...
  function fgt_async_commit (line 341) | static inline void fgt_async_commit( void * /*node*/, void * /*graph*/ )...
  function fgt_reserve_wait (line 342) | static inline void fgt_reserve_wait( void * /*graph*/ ) { }
  function fgt_release_wait (line 343) | static inline void fgt_release_wait( void * /*graph*/ ) { }
  function alias_port (line 350) | static void alias_port( void * /*node*/, PortsTuple & /*ports*/ ) { }
  function alias_port (line 355) | static void alias_port( void * /*node*/, PortsTuple & /*ports*/ ) { }

FILE: src/tbb/include/oneapi/tbb/detail/_flow_graph_types_impl.h
  type Kp (line 39) | typedef Kp K;
  type Tp (line 40) | typedef Tp T;
  type type_to_key_function_body (line 41) | typedef type_to_key_function_body<T,K> TtoK;
  type KHashp (line 42) | typedef KHashp KHash;
  type typename (line 56) | typedef typename std::tuple<PT<Args>... > type;
  type typename (line 61) | typedef typename KeyTraits::key_type K;
  type typename (line 62) | typedef typename KeyTraits::hash_compare_type KHash;
  type typename (line 63) | typedef typename std::tuple<PT<KeyTrait<K, KHash, Args> >... > type;
  type test_alignment (line 77) | typedef struct { char t; U    padded; } test_alignment;
  type default_constructed (line 128) | struct default_constructed { }
  type WrapperBase (line 135) | struct WrapperBase {
  type T (line 145) | typedef T value_type;
  type T (line 146) | typedef T* pointer_type;
  type _unwind_space (line 156) | struct _unwind_space {
  function CopyTo (line 167) | void CopyTo(void* newSpace) const override {
  type T (line 178) | typedef T value_type;
  type T (line 179) | typedef T* pointer_type;
  type T (line 181) | typedef T ArrayType[N];
  type _unwind_class (line 193) | struct _unwind_class {
  function explicit (line 223) | explicit Wrapper(const Wrapper& other) : WrapperBase() {
  function CopyTo (line 235) | void CopyTo(void* newSpace) const override {
  type typename (line 256) | typedef typename pick_one< (Selector<T1>::value > Selector<T2>::value), ...
  type typename (line 262) | typedef typename pick_tuple_max<N-1, Tuple, Selector>::type LeftMaxType;
  type typename (line 263) | typedef typename std::tuple_element<N
  type typename (line 264) | typedef typename pick_max<Selector, LeftMaxType, ThisType>::type type;
  type typename (line 274) | typedef typename std::tuple_element<N
  function construct (line 292) | static void construct(void *mySpace, const T& x) {
  function construct (line 298) | static void construct(void * /*mySpace*/, const T& x) {
  type tagged_null_type (line 311) | struct tagged_null_type {}
  type typename (line 338) | typedef typename pick_tuple_max<N, Tuple, alignment_of>::type AlignType;
  type typename (line 339) | typedef typename pick_tuple_max<N, Tuple, size_of>::type MaxSizeType;
  type aligned_space (line 342) | typedef aligned_space<AlignType, MaxNElements> SpaceType;
  function set_tag (line 401) | void set_tag(TagType const &index) {my_tag = index;}
  type op_stat (line 420) | enum op_stat { WAIT = 0, SUCCEEDED, FAILED }

FILE: src/tbb/include/oneapi/tbb/detail/_hash_compare.h
  function namespace (line 24) | namespace tbb {
  function namespace (line 91) | inline namespace d0 {
  function namespace (line 107) | namespace std {

FILE: src/tbb/include/oneapi/tbb/detail/_intrusive_list_node.h
  function namespace (line 20) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_machine.h
  function namespace (line 58) | inline namespace d0 {
  type cpu_ctl_env (line 242) | struct cpu_ctl_env {
  function namespace (line 319) | namespace r1 {
  function class (line 326) | class cpu_ctl_env {

FILE: src/tbb/include/oneapi/tbb/detail/_namespace_injection.h
  function namespace (line 20) | namespace tbb {}
  function namespace (line 22) | namespace oneapi {

FILE: src/tbb/include/oneapi/tbb/detail/_node_handle.h
  function namespace (line 23) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_pipeline_filters.h
  function namespace (line 29) | namespace detail {
  function finalize (line 247) | void finalize(void * input) override {
  function finalize (line 294) | void finalize(void* input) override {
  function class (line 317) | class filter_node_ptr {
  function class (line 335) | class filter_node {
  function filter_node_ptr (line 380) | inline filter_node_ptr::filter_node_ptr(filter_node * nd) : my_node(nd) {
  function filter_node_ptr (line 386) | inline filter_node_ptr::~filter_node_ptr() {
  function filter_node_ptr (line 392) | inline filter_node_ptr::filter_node_ptr(const filter_node_ptr & rhs) : m...
  function filter_node_ptr (line 398) | inline filter_node_ptr::filter_node_ptr(filter_node_ptr && rhs) : my_nod...
  function filter_node (line 428) | inline filter_node& filter_node_ptr::operator*() const{
  function base_filter (line 442) | base_filter* create_filter() const override {

FILE: src/tbb/include/oneapi/tbb/detail/_pipeline_filters_deduction.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_range_common.h
  function namespace (line 29) | inline namespace d0 {
  function iterator_concept_helper (line 106) | bool iterator_concept_helper( std::input_iterator_tag ) {
  function iterator_concept_helper (line 111) | bool iterator_concept_helper( std::random_access_iterator_tag ) {

FILE: src/tbb/include/oneapi/tbb/detail/_rtm_mutex.h
  function namespace (line 26) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_rtm_rw_mutex.h
  function namespace (line 26) | namespace tbb {
  function namespace (line 124) | namespace r1 {
  function namespace (line 143) | namespace d1 {

FILE: src/tbb/include/oneapi/tbb/detail/_scoped_lock.h
  function namespace (line 20) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_segment_table.h
  function namespace (line 36) | namespace tbb {
  function swap (line 141) | void swap( segment_table& other )
  function segment_type (line 153) | segment_type get_segment( segment_index_type index ) const {
  function value_type (line 161) | const value_type& operator[]( size_type index ) const {
  function enable_segment (line 173) | void enable_segment( segment_type& segment, segment_table_type table, se...
  function delete_segment (line 191) | void delete_segment( segment_index_type seg_index ) {
  function size_type (line 203) | size_type number_of_segments( segment_table_type table ) const {
  function size_type (line 221) | size_type find_last_allocated_segment( segment_table_type table ) const ...
  function reserve (line 233) | void reserve( size_type n ) {
  function clear (line 246) | void clear() {
  function clear_segments (line 253) | void clear_segments() {
  function clear_table (line 263) | void clear_table() {
  function extend_table_if_necessary (line 277) | void extend_table_if_necessary(segment_table_type& table, size_type star...
  function segment_index_type (line 309) | static constexpr segment_index_type segment_index_of( size_type index ) {
  function size_type (line 314) | static constexpr size_type segment_base( size_type index ) {
  function size_type (line 319) | static constexpr size_type segment_size( size_type index ) {
  type copy_segment_body_type (line 329) | struct copy_segment_body_type {
  type move_segment_body_type (line 336) | struct move_segment_body_type {
  function internal_move (line 375) | void internal_move( segment_table&& other ) {
  function internal_move_construct_with_allocator (line 398) | void internal_move_construct_with_allocator( segment_table&& other, cons...
  function internal_move_construct_with_allocator (line 405) | void internal_move_construct_with_allocator( segment_table&& other, cons...
  function internal_move_assign (line 422) | void internal_move_assign( segment_table&& other, /*is_always_equal || P...
  function internal_move_assign (line 428) | void internal_move_assign( segment_table&& other, /*is_always_equal || P...
  function internal_swap (line 440) | void internal_swap( segment_table& other, /*is_always_equal || POCS = */...
  function internal_swap (line 448) | void internal_swap( segment_table& other, /*is_always_equal || POCS = */...
  function internal_swap_fields (line 454) | void internal_swap_fields( segment_table& other ) {
  function assign_first_block_if_necessary (line 530) | void assign_first_block_if_necessary(segment_index_type index) {
  function zero_table (line 537) | void zero_table( segment_table_type table, size_type count ) {

FILE: src/tbb/include/oneapi/tbb/detail/_small_object_pool.h
  function namespace (line 28) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_task.h
  function namespace (line 34) | namespace tbb {
  function class (line 195) | class reference_vertex : public wait_tree_vertex_interface {
  type execution_data (line 221) | struct execution_data {
  function slot_id (line 223) | slot_id original_slot{}
  function slot_id (line 224) | slot_id affinity_slot{}
  function task_group_context (line 227) | inline task_group_context* context(const execution_data& ed) {
  function slot_id (line 231) | inline slot_id original_slot(const execution_data& ed) {
  function slot_id (line 235) | inline slot_id affinity_slot(const execution_data& ed) {
  function slot_id (line 239) | inline slot_id execution_slot(const execution_data& ed) {
  function is_same_affinity (line 243) | inline bool is_same_affinity(const execution_data& ed) {
  function is_stolen (line 247) | inline bool is_stolen(const execution_data& ed) {
  function spawn (line 251) | inline void spawn(task& t, task_group_context& ctx) {
  function spawn (line 256) | inline void spawn(task& t, task_group_context& ctx, slot_id id) {
  function execute_and_wait (line 261) | inline void execute_and_wait(task& t, task_group_context& t_ctx, wait_co...
  function wait (line 267) | inline void wait(wait_context& wait_ctx, task_group_context& ctx) {
  function class (line 275) | class task_traits {
  function class (line 285) | class alignas(task_alignment) task : public task_traits {

FILE: src/tbb/include/oneapi/tbb/detail/_task_handle.h
  function namespace (line 27) | namespace tbb {
  function noexcept (line 111) | nullptr_t) noexcept {

FILE: src/tbb/include/oneapi/tbb/detail/_template_helpers.h
  function namespace (line 30) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/detail/_utils.h
  function namespace (line 29) | namespace tbb {
  function log2 (line 142) | uintptr_t log2(T in) {
  function is_power_of_two (line 160) | bool is_power_of_two( IntegerType arg ) {
  function is_power_of_two_at_least (line 170) | bool is_power_of_two_at_least(ArgIntegerType arg, DivisorIntegerType div...
  function ArgIntegerType (line 179) | ArgIntegerType modulo_power_of_two(ArgIntegerType arg, DivisorIntegerTyp...
  function is_aligned (line 186) | bool is_aligned(T* pointer, std::uintptr_t alignment) {
  function poison_pointer (line 198) | void poison_pointer(std::atomic<T*>& p) { p.store(reinterpret_cast<T*>(p...
  function is_poisoned (line 202) | bool is_poisoned( T* p ) { return p == reinterpret_cast<T*>(poisoned_ptr...
  function is_poisoned (line 205) | bool is_poisoned(const std::atomic<T*>& p) { return is_poisoned(p.load(s...
  function class (line 230) | class no_assign {
  function class (line 238) | class no_copy: no_assign {
  type class (line 252) | enum class
  function namespace (line 368) | namespace d1 {

FILE: src/tbb/include/oneapi/tbb/detail/_waitable_atomic.h
  function namespace (line 22) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/enumerable_thread_specific.h
  function namespace (line 52) | namespace tbb {
  function reference (line 587) | reference operator*() const {
  function pointer (line 595) | pointer operator->() const { return &operator*();}
  function advance_me (line 602) | void advance_me() {
  function construct (line 632) | void construct(void*where) {new(where) T();}
  function construct_by_default (line 633) | construct_by_default( int ) {}
  function construct (line 639) | void construct(void*where) {new(where) T(exemplar);}
  function exemplar (line 640) | construct_by_exemplar( const T& t ) : exemplar(t) {}
  function construct (line 647) | void construct(void* where) {new(where) T(f());}
  function construct (line 654) | void construct(void* where) {
  function class (line 664) | class callback_base {
  function callback_base (line 682) | callback_base* clone() const override {
  function destroy (line 686) | void destroy() override {
  function construct (line 692) | void construct(void* where) override {
  function U (line 718) | U* value() { return my_space.begin(); }
  function U (line 719) | U* value_committed() { is_built = true; return my_space.begin(); }
  function free_array (line 822) | void free_array( void* _ptr, std::size_t _size) override {
  function explicit (line 860) | explicit enumerable_thread_specific( const T& exemplar ) : my_construct_...
  function explicit (line 864) | explicit enumerable_thread_specific( T&& exemplar ) : my_construct_callb...
  function reference (line 886) | reference local() {
  function reference (line 892) | reference local(bool& exists)  {
  function iterator (line 904) | iterator begin() { return iterator( my_locals, 0 ); }
  function iterator (line 906) | iterator end() { return iterator(my_locals, my_locals.size() ); }
  function clear (line 921) | void clear() {
  function internal_swap (line 939) | void internal_swap(enumerable_thread_specific& other) {
  function iterator (line 1073) | iterator begin() { return iterator(*my_container) = my_begin; }
  function iterator (line 1074) | iterator end() { return iterator(*my_container) = my_end; }
  function size_type (line 1078) | size_type size() const {
  function namespace (line 1105) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/flow_graph.h
  function namespace (line 71) | namespace tbb {
  function namespace (line 166) | namespace d2 {
  function graph_task (line 175) | static inline graph_task* combine_tasks(graph& g, graph_task* left, grap...
  function class (line 192) | class message_metainfo {
  function merge (line 206) | void merge(const message_metainfo& other) {
  function try_put (line 295) | bool try_put( const T& t ) {
  function try_put_and_wait (line 301) | bool try_put_and_wait( const T& t ) {
  type sender (line 320) | typedef sender<T> predecessor_type;
  function virtual (line 332) | virtual bool is_continue_receiver() { return false; }
  function continue_msg (line 372) | continue_receiver( const continue_receiver& src ) : receiver<continue_ms...
  function register_predecessor (line 379) | bool register_predecessor( predecessor_type & ) override {
  function remove_predecessor (line 389) | bool remove_predecessor( predecessor_type & ) override {
  type continue_msg (line 396) | typedef continue_msg input_type;
  type receiver (line 399) | typedef receiver<input_type>::predecessor_type predecessor_type;
  function graph_task (line 447) | graph_task* try_put_task( const input_type& input, const message_metainf...
  function virtual (line 464) | virtual void reset_receiver( reset_flags f ) {
  function is_continue_receiver (line 480) | bool is_continue_receiver() override { return true; }

FILE: src/tbb/include/oneapi/tbb/flow_graph_abstractions.h
  function namespace (line 20) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/global_control.h
  function namespace (line 31) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/info.h
  function namespace (line 27) | namespace tbb {
  function namespace (line 109) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/memory_pool.h
  function namespace (line 38) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/mutex.h
  function namespace (line 27) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/null_mutex.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/null_rw_mutex.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/parallel_for.h
  function namespace (line 37) | inline namespace d0 {
  function const (line 192) | void operator()( const blocked_range<Index>& r ) const {

FILE: src/tbb/include/oneapi/tbb/parallel_for_each.h
  function namespace (line 34) | namespace tbb {
  function internal_add_copy_impl (line 174) | void internal_add_copy_impl(std::true_type, const Item& item) {
  function internal_add_copy_impl (line 182) | void internal_add_copy_impl(std::false_type, const Item&) {
  function internal_add_copy (line 186) | void internal_add_copy(const Item& item) override {
  function internal_add_move (line 190) | void internal_add_move(Item&& item) override {
  function finalize (line 219) | void finalize() {
  function finalize (line 279) | void finalize(const execution_data& ed) {
  function finalize (line 344) | void finalize(const execution_data& ed) {
  function const (line 395) | void operator()(tbb::blocked_range<std::size_t> range) const {
  function small_object_allocator (line 519) | small_object_allocator alloc{}
  function small_object_allocator (line 562) | small_object_allocator alloc{}

FILE: src/tbb/include/oneapi/tbb/parallel_invoke.h
  function namespace (line 33) | namespace tbb {
  function small_object_allocator (line 173) | small_object_allocator alloc{}
  function wait_context (line 183) | wait_context root_wait_ctx{0};
  function wait_context (line 192) | wait_context root_wait_ctx{0}
  function namespace (line 222) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/parallel_pipeline.h
  function namespace (line 29) | namespace tbb {
  function namespace (line 143) | inline namespace v1

FILE: src/tbb/include/oneapi/tbb/parallel_reduce.h
  function namespace (line 31) | namespace tbb {
  function join (line 242) | void join(task_group_context* context) {
  function run (line 281) | static void run(const Range& range, Body& body, Partitioner& partitioner...
  function run (line 291) | static void run(const Range& range, Body& body, Partitioner& partitioner) {
  function run_body (line 299) | void run_body( Range &r ) {
  function offer_work (line 303) | void offer_work(typename Partitioner::split_type& split_obj, execution_d...
  function small_object_allocator (line 309) | small_object_allocator alloc{}
  function spawn_self (line 322) | void spawn_self(execution_data& ed) {
  function join (line 396) | void join( lambda_reduce_body& rhs ) {

FILE: src/tbb/include/oneapi/tbb/parallel_scan.h
  function namespace (line 33) | namespace detail {
  function namespace (line 55) | namespace d0 {
  function namespace (line 81) | namespace d1 {
  function reverse_join (line 153) | void reverse_join( final_sum& a ) {
  function reverse_join (line 156) | void reverse_join( Body& body ) {
  function assign_to (line 159) | void assign_to( Body& body ) {
  function self_destroy (line 162) | void self_destroy(const execution_data& ed) {
  function sum_node (line 235) | sum_node* finalize(const execution_data& ed) {
  function self_destroy (line 268) | void self_destroy(const execution_data& ed) {
  type start_scan (line 272) | struct start_scan
  type finish_scan (line 275) | struct finish_scan
  function finish_scan (line 341) | finish_scan* finalize(const execution_data& ed) {
  function finish_pass1_type (line 369) | finish_pass1_type* release_parent() {
  function finish_pass1_type (line 383) | finish_pass1_type* finalize( const execution_data& ed ) {
  function wait_context (line 431) | wait_context w_ctx{1};
  function small_object_allocator (line 462) | small_object_allocator alloc{}
  function small_object_allocator (line 480) | small_object_allocator alloc{}
  function reverse_join (line 527) | void reverse_join( lambda_scan_body& a ) {
  function assign (line 531) | void assign( lambda_scan_body& b ) {

FILE: src/tbb/include/oneapi/tbb/parallel_sort.h
  function namespace (line 52) | namespace d1 {
  function const (line 148) | void operator()( const blocked_range<RandomAccessIterator>& range ) const {
  function const (line 169) | void operator()( const quick_sort_range<RandomAccessIterator,Compare>& r...

FILE: src/tbb/include/oneapi/tbb/partitioner.h
  function namespace (line 60) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/profiling.h
  function namespace (line 25) | namespace tbb {
  function namespace (line 65) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/queuing_mutex.h
  function class (line 35) | class queuing_mutex {

FILE: src/tbb/include/oneapi/tbb/queuing_rw_mutex.h
  function namespace (line 30) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/rw_mutex.h
  function namespace (line 27) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/scalable_allocator.h
  type ScalableAllocationResult (line 88) | typedef enum {
  type AllocationModeParam (line 98) | typedef enum {
  type ScalableAllocationCmd (line 114) | typedef enum {
  function namespace (line 135) | namespace rml {

FILE: src/tbb/include/oneapi/tbb/spin_mutex.h
  function namespace (line 31) | namespace tbb {
  function namespace (line 123) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/spin_rw_mutex.h
  function namespace (line 31) | namespace tbb {
  function namespace (line 218) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/task.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/task_arena.h
  function namespace (line 35) | namespace tbb {
  function initialize (line 345) | void initialize(attach) {
  function initialize (line 357) | void initialize(d1::attach) {
  function terminate (line 363) | void terminate() {
  function enqueue (line 393) | void enqueue(d2::task_handle&& th) {
  function debug_wait_until_empty (line 423) | void debug_wait_until_empty() {
  function current_thread_index (line 450) | inline int current_thread_index() {
  function is_inside_task (line 456) | inline bool is_inside_task() {
  function max_concurrency (line 462) | inline int max_concurrency() {
  function enqueue (line 466) | inline void enqueue(d2::task_handle&& th) {
  function namespace (line 480) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/task_group.h
  function namespace (line 41) | namespace tbb {
  function task_group_status (line 551) | task_group_status wait() {
  function cancel (line 563) | void cancel() {
  function class (line 568) | class task_group : public task_group_base {
  function task_group_status (line 598) | task_group_status run_and_wait(d2::task_handle&& h) {
  function class (line 604) | class spawn_delegate : public d1::delegate_base {
  function class (line 617) | class wait_delegate : public d1::delegate_base {
  function class (line 642) | class isolated_task_group : public task_group {
  function namespace (line 688) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/task_scheduler_observer.h
  function namespace (line 27) | namespace tbb {

FILE: src/tbb/include/oneapi/tbb/tbb_allocator.h
  function namespace (line 29) | namespace tbb {
  function namespace (line 121) | inline namespace v1 {

FILE: src/tbb/include/oneapi/tbb/tbbmalloc_proxy.h
  type __TBB_malloc_proxy_caller (line 56) | struct __TBB_malloc_proxy_caller {

FILE: src/tbb/include/oneapi/tbb/tick_count.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/src/tbb/address_waiter.cpp
  type tbb (line 24) | namespace tbb {
    type detail (line 25) | namespace detail {
      type r1 (line 26) | namespace r1 {
        type address_context (line 28) | struct address_context {
          method address_context (line 29) | address_context() = default;
          method address_context (line 31) | address_context(void* address, std::uintptr_t context) :
        class address_waiter (line 39) | class address_waiter : public concurrent_monitor_base<address_cont...
        function clear_address_waiter_table (line 58) | void clear_address_waiter_table() {
        function address_waiter (line 64) | static address_waiter& get_address_waiter(void* address) {
        function wait_on_address (line 69) | void wait_on_address(void* address, d1::delegate_base& predicate, ...
        function notify_by_address (line 74) | void notify_by_address(void* address, std::uintptr_t target_contex...
        function notify_by_address_one (line 84) | void notify_by_address_one(void* address) {
        function notify_by_address_all (line 94) | void notify_by_address_all(void* address) {

FILE: src/tbb/src/tbb/allocator.cpp
  type tbb (line 70) | namespace tbb {
    type detail (line 71) | namespace detail {
      type r1 (line 72) | namespace r1 {
        function initialize_handler_pointers (line 134) | void initialize_handler_pointers() {
        function initialize_cache_aligned_allocator (line 155) | void initialize_cache_aligned_allocator() {
        function std_cache_aligned_deallocate (line 242) | static void std_cache_aligned_deallocate(void* p) {

FILE: src/tbb/src/tbb/arena.cpp
  type tbb (line 32) | namespace tbb {
    type detail (line 33) | namespace detail {
      type r1 (line 34) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
      type r1 (line 466) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
    type detail (line 465) | namespace detail {
      type r1 (line 34) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
      type r1 (line 466) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
  type tbb (line 464) | namespace tbb {
    type detail (line 33) | namespace detail {
      type r1 (line 34) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
      type r1 (line 466) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
    type detail (line 465) | namespace detail {
      type r1 (line 34) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...
      type r1 (line 466) | namespace r1 {
        class numa_binding_observer (line 37) | class numa_binding_observer : public tbb::task_scheduler_observer {
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function numa_binding_observer (line 58) | numa_binding_observer* construct_binding_observer( d1::task_arena*...
          method numa_binding_observer (line 40) | numa_binding_observer( d1::task_arena* ta, int num_slots, int nu...
          method on_scheduler_entry (line 45) | void on_scheduler_entry( bool ) override {
          method on_scheduler_exit (line 49) | void on_scheduler_exit( bool ) override {
        function destroy_binding_observer (line 67) | void destroy_binding_observer( numa_binding_observer* binding_obse...
        function arena (line 281) | arena& arena::allocate_arena(threading_control* control, unsigned ...
        function thread_control_monitor (line 434) | thread_control_monitor& arena::get_waiting_threads_monitor() {
        function arena (line 446) | arena& arena::create(threading_control* control, unsigned num_slot...
        function assert_arena_priority_valid (line 469) | void assert_arena_priority_valid( tbb::task_arena::priority a_prio...
        function assert_arena_priority_valid (line 478) | void assert_arena_priority_valid( tbb::task_arena::priority ) {}
        function arena_priority_level (line 481) | unsigned arena_priority_level( tbb::task_arena::priority a_priorit...
        function arena_priority (line 486) | tbb::task_arena::priority arena_priority( unsigned priority_level ) {
        type task_arena_impl (line 494) | struct task_arena_impl {
        class nested_arena_context (line 636) | class nested_arena_context : no_copy {
          method nested_arena_context (line 638) | nested_arena_context(thread_data& td, arena& nested_arena, std::...
        class delegated_task (line 719) | class delegated_task : public d1::task {
          method finalize (line 747) | void finalize() {
          method delegated_task (line 755) | delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::...
        function isolate_within_arena (line 878) | void isolate_within_arena(d1::delegate_base& d, std::intptr_t isol...

FILE: src/tbb/src/tbb/arena.h
  function namespace (line 41) | namespace r1 {

FILE: src/tbb/src/tbb/arena_slot.cpp
  type tbb (line 21) | namespace tbb {
    type detail (line 22) | namespace detail {
      type r1 (line 23) | namespace r1 {

FILE: src/tbb/src/tbb/arena_slot.h
  function namespace (line 33) | namespace tbb {

FILE: src/tbb/src/tbb/assert_impl.h
  function namespace (line 34) | namespace rml { namespace internal {

FILE: src/tbb/src/tbb/cancellation_disseminator.h
  function namespace (line 26) | namespace tbb {

FILE: src/tbb/src/tbb/co_context.h
  type coroutine_type (line 72) | struct coroutine_type {
  function my_is_active (line 83) | bool my_is_active{ true };
  type LPVOID (line 86) | typedef LPVOID coroutine_type;
  type coroutine_type (line 88) | struct coroutine_type {
  function class (line 102) | class co_context {
  function check (line 159) | inline void check(int error_code, const char* routine) {
  function create_coroutine (line 206) | inline void create_coroutine(coroutine_type& c, std::size_t stack_size, ...

FILE: src/tbb/src/tbb/concurrent_bounded_queue.cpp
  type tbb (line 22) | namespace tbb {
    type detail (line 23) | namespace detail {
      type r1 (line 24) | namespace r1 {
        type predicate_leq (line 68) | struct predicate_leq {
          method predicate_leq (line 70) | predicate_leq( std::size_t ticket ) : my_ticket(ticket) {}

FILE: src/tbb/src/tbb/concurrent_monitor.h
  function namespace (line 30) | namespace r1 {
  function virtual (line 114) | virtual void init() {
  function virtual (line 121) | virtual void reset() {
  function Context (line 132) | Context my_context{}
  function my_initialized (line 139) | bool my_initialized{false};

FILE: src/tbb/src/tbb/concurrent_monitor_mutex.h
  function namespace (line 27) | namespace detail {

FILE: src/tbb/src/tbb/dynamic_link.cpp
  type tbb (line 104) | namespace tbb {
    type detail (line 105) | namespace detail {
      type r1 (line 106) | namespace r1 {
        function dynamic_link_warning (line 113) | static void dynamic_link_warning( dynamic_link_error_t code, ... ) {
        function resolve_symbols (line 118) | static bool resolve_symbols( dynamic_link_handle module, const dyn...
        function dynamic_link (line 149) | bool dynamic_link( const char*  library, const dynamic_link_descri...
        function dynamic_unlink (line 161) | void dynamic_unlink( dynamic_link_handle ) {}
        function dynamic_unlink_all (line 162) | void dynamic_unlink_all() {}
        type handles_t (line 191) | struct handles_t {
          method add (line 195) | void add(const dynamic_link_handle &handle) {
          method free (line 201) | void free() {
        type ap_data_t (line 210) | struct ap_data_t {
        function init_ap_data (line 215) | static void init_ap_data() {
        function init_dl_data (line 298) | static void init_dl_data() {
        function abs_path (line 314) | static std::size_t abs_path( char const * name, char * path, std::...
        function init_dynamic_link_data (line 331) | void init_dynamic_link_data() {
        type static_init_dl_data_t (line 341) | struct static_init_dl_data_t {
          method static_init_dl_data_t (line 342) | static_init_dl_data_t() {
        function weak_symbol_link (line 349) | static bool weak_symbol_link( const dynamic_link_descriptor descri...
        function weak_symbol_link (line 361) | static bool weak_symbol_link( const dynamic_link_descriptor[], std...
        function dynamic_unlink (line 366) | void dynamic_unlink( dynamic_link_handle handle ) {
        function dynamic_unlink_all (line 375) | void dynamic_unlink_all() {
        function dynamic_link_handle (line 381) | static dynamic_link_handle global_symbols_link( const char* librar...
        function save_library_handle (line 403) | static void save_library_handle( dynamic_link_handle src, dynamic_...
        function loading_flags (line 414) | int loading_flags(bool local_binding) {
        function dynamic_link_handle (line 430) | dynamic_link_handle dynamic_load( const char* library, const dynam...
        function dynamic_link (line 464) | bool dynamic_link( const char* library, const dynamic_link_descrip...
        function dynamic_link (line 493) | bool dynamic_link( const char*, const dynamic_link_descriptor*, st...
        function dynamic_unlink (line 498) | void dynamic_unlink( dynamic_link_handle ) {}
        function dynamic_unlink_all (line 499) | void dynamic_unlink_all() {}

FILE: src/tbb/src/tbb/dynamic_link.h
  function namespace (line 36) | namespace tbb {

FILE: src/tbb/src/tbb/environment.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbb/exception.cpp
  type tbb (line 35) | namespace tbb {
    type detail (line 36) | namespace detail {
      type r1 (line 37) | namespace r1 {
        function do_throw_noexcept (line 45) | void do_throw_noexcept(F throw_func) noexcept {
        function do_throw_noexcept (line 49) | void do_throw_noexcept(void (*throw_func)()) noexcept {
        function do_throw (line 62) | void do_throw(F throw_func) {
        function throw_exception (line 79) | void throw_exception ( exception_id eid ) {
        function handle_perror (line 104) | void handle_perror( int error_code, const char* what ) {
        function fix_broken_rethrow (line 130) | void fix_broken_rethrow() {
        function gcc_rethrow_exception_broken (line 139) | bool gcc_rethrow_exception_broken() {
        function fix_broken_rethrow (line 159) | void fix_broken_rethrow() {}
        function gcc_rethrow_exception_broken (line 160) | bool gcc_rethrow_exception_broken() { return false; }

FILE: src/tbb/src/tbb/global_control.cpp
  type tbb (line 33) | namespace tbb {
    type detail (line 34) | namespace detail {
      type r1 (line 35) | namespace r1 {
        type control_storage_comparator (line 38) | struct control_storage_comparator {
        class control_storage (line 42) | class control_storage {
          method apply_active (line 55) | virtual void apply_active(std::size_t new_active) {
          method is_first_arg_preferred (line 58) | virtual bool is_first_arg_preferred(std::size_t a, std::size_t b...
          method active_value (line 61) | virtual std::size_t active_value() {
          method active_value_unsafe (line 66) | std::size_t active_value_unsafe() {
        class allowed_parallelism_control (line 71) | class alignas(max_nfs_size) allowed_parallelism_control : public c...
          method default_value (line 72) | std::size_t default_value() const override {
          method is_first_arg_preferred (line 75) | bool is_first_arg_preferred(std::size_t a, std::size_t b) const ...
          method apply_active (line 78) | void apply_active(std::size_t new_active) override {
          method active_value (line 84) | std::size_t active_value() override {
        class stack_size_control (line 98) | class alignas(max_nfs_size) stack_size_control : public control_st...
          method default_value (line 99) | std::size_t default_value() const override {
          method apply_active (line 113) | void apply_active(std::size_t new_active) override {
        class terminate_on_exception_control (line 121) | class alignas(max_nfs_size) terminate_on_exception_control : publi...
          method default_value (line 122) | std::size_t default_value() const override {
        class lifetime_control (line 127) | class alignas(max_nfs_size) lifetime_control : public control_stor...
          method is_first_arg_preferred (line 128) | bool is_first_arg_preferred(std::size_t, std::size_t) const over...
          method default_value (line 131) | std::size_t default_value() const override {
          method apply_active (line 134) | void apply_active(std::size_t new_active) override {
        function global_control_acquire (line 147) | void global_control_acquire() {
        function global_control_release (line 154) | void global_control_release() {
        function global_control_lock (line 162) | void global_control_lock() {
        function global_control_unlock (line 168) | void global_control_unlock() {
        function global_control_active_value_unsafe (line 175) | std::size_t global_control_active_value_unsafe(d1::global_control:...
        function terminate_on_exception (line 186) | bool terminate_on_exception() {
        type global_control_impl (line 190) | struct global_control_impl {
          method erase_if_present (line 192) | static bool erase_if_present(control_storage* const c, d1::globa...
          method create (line 203) | static void create(d1::global_control& gc) {
          method destroy (line 216) | static void destroy(d1::global_control& gc) {
          method remove_and_check_if_empty (line 239) | static bool remove_and_check_if_empty(d1::global_control& gc) {
          method is_present (line 249) | static bool is_present(d1::global_control& gc) {
        function remove_and_check_if_empty (line 270) | bool remove_and_check_if_empty(d1::global_control& gc) {
        function is_present (line 274) | bool is_present(d1::global_control& gc) {

FILE: src/tbb/src/tbb/governor.cpp
  type tbb (line 44) | namespace tbb {
    type detail (line 45) | namespace detail {
      type r1 (line 46) | namespace r1 {
        type rml (line 60) | namespace rml {
        type system_topology (line 64) | namespace system_topology {
          function processor_groups_num (line 469) | int processor_groups_num() {
          function initialization_impl (line 481) | void initialization_impl() {
          function initialize (line 506) | void initialize() {
          function destroy (line 510) | void destroy() {
        function get_stack_base (line 154) | static std::uintptr_t get_stack_base(std::size_t stack_size) {
        function register_external_thread_destructor (line 196) | static void register_external_thread_destructor() {
        function release_impl (line 291) | void release_impl(d1::task_scheduler_handle& handle) {
        function finalize_impl (line 299) | bool finalize_impl(d1::task_scheduler_handle& handle) {
        function dummy_destroy_system_topology (line 370) | static void dummy_destroy_system_topology ( ) { }
        function binding_handler (line 371) | static binding_handler* dummy_allocate_binding_handler ( int, int,...
        function dummy_deallocate_binding_handler (line 372) | static void dummy_deallocate_binding_handler ( binding_handler* ) { }
        function dummy_apply_affinity (line 373) | static void dummy_apply_affinity ( binding_handler*, int ) { }
        function dummy_restore_affinity (line 374) | static void dummy_restore_affinity ( binding_handler*, int ) { }
        function dummy_get_default_concurrency (line 375) | static int dummy_get_default_concurrency( int, int, int ) { return...
        type system_topology (line 439) | namespace system_topology {
          function processor_groups_num (line 469) | int processor_groups_num() {
          function initialization_impl (line 481) | void initialization_impl() {
          function initialize (line 506) | void initialize() {
          function destroy (line 510) | void destroy() {
        function binding_handler (line 515) | binding_handler* construct_binding_handler(int slot_num, int numa_...
        function destroy_binding_handler (line 520) | void destroy_binding_handler(binding_handler* handler_ptr) {
        function apply_affinity_mask (line 525) | void apply_affinity_mask(binding_handler* handler_ptr, int slot_in...
        function restore_affinity_mask (line 531) | void restore_affinity_mask(binding_handler* handler_ptr, int slot_...
        function numa_node_count (line 537) | unsigned __TBB_EXPORTED_FUNC numa_node_count() {
        function core_type_count (line 560) | unsigned __TBB_EXPORTED_FUNC core_type_count(intptr_t /*reserved*/) {
        function constraints_assertion (line 570) | void constraints_assertion(d1::constraints c) {

FILE: src/tbb/src/tbb/governor.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbb/intrusive_list.h
  function namespace (line 22) | namespace tbb {
  function T (line 198) | static T& item ( intrusive_list_node* node ) {
  function T (line 206) | static const T& item( const intrusive_list_node* node ) {
  function T (line 224) | static T& item ( intrusive_list_node* node ) { return *static_cast<T*>(n...
  function T (line 226) | static const T& item( const intrusive_list_node* node ) { return *static...

FILE: src/tbb/src/tbb/itt_notify.cpp
  type tbb (line 45) | namespace tbb {
    type detail (line 46) | namespace detail {
      type r1 (line 47) | namespace r1 {
        function __TBB_load_ittnotify (line 50) | int __TBB_load_ittnotify() {

FILE: src/tbb/src/tbb/itt_notify.h
  function namespace (line 49) | namespace tbb {

FILE: src/tbb/src/tbb/mailbox.h
  function namespace (line 27) | namespace tbb {

FILE: src/tbb/src/tbb/main.cpp
  type tbb (line 28) | namespace tbb {
    type detail (line 29) | namespace detail {
      type r1 (line 30) | namespace r1 {
        function DoOneTimeInitialization (line 104) | void DoOneTimeInitialization() {
        function DllMain (line 132) | bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID lpv...

FILE: src/tbb/src/tbb/main.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/src/tbb/market.cpp
  type tbb (line 22) | namespace tbb {
    type detail (line 23) | namespace detail {
      type r1 (line 24) | namespace r1 {
        class tbb_permit_manager_client (line 27) | class tbb_permit_manager_client : public pm_client {
          method tbb_permit_manager_client (line 29) | tbb_permit_manager_client(arena& a) : pm_client(a) {}
          method register_thread (line 31) | void register_thread() override {}
          method unregister_thread (line 33) | void unregister_thread() override {}
          method set_allotment (line 35) | void set_allotment(unsigned allotment) {
        function pm_client (line 48) | pm_client* market::create_client(arena& a) {

FILE: src/tbb/src/tbb/market.h
  function namespace (line 30) | namespace tbb {

FILE: src/tbb/src/tbb/market_concurrent_monitor.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbb/misc.cpp
  type tbb (line 44) | namespace tbb {
    type detail (line 45) | namespace detail {
      type r1 (line 46) | namespace r1 {
        function DefaultSystemPageSize (line 61) | size_t DefaultSystemPageSize() {
        function PrintVersion (line 76) | void PrintVersion() {
        function PrintExtraVersionInfo (line 81) | void PrintExtraVersionInfo( const char* category, const char* form...
        function check_cpuid (line 100) | void check_cpuid(int leaf, int sub_leaf, int registers[4]) {
        function detect_cpu_features (line 131) | void detect_cpu_features(cpu_features_type& cpu_features) {

FILE: src/tbb/src/tbb/misc.h
  function namespace (line 43) | namespace tbb {

FILE: src/tbb/src/tbb/misc_ex.cpp
  type tbb (line 52) | namespace tbb {
    type detail (line 53) | namespace detail {
      type r1 (line 54) | namespace r1 {
        function set_thread_affinity_mask (line 67) | static void set_thread_affinity_mask( std::size_t maskSize, const ...
        function get_thread_affinity_mask (line 80) | static void get_thread_affinity_mask( std::size_t maskSize, basic_...
        function destroy_process_mask (line 92) | void destroy_process_mask() {
        function initialize_hardware_concurrency_info (line 133) | static void initialize_hardware_concurrency_info () {
        function AvailableHwConcurrency (line 197) | int AvailableHwConcurrency() {
        function AvailableHwConcurrency (line 207) | int AvailableHwConcurrency() {
        function AvailableHwConcurrency (line 224) | int AvailableHwConcurrency() {
        type ProcessorGroupInfo (line 239) | struct ProcessorGroupInfo {
        type TBB_GROUP_AFFINITY (line 263) | struct TBB_GROUP_AFFINITY {
        function initialize_hardware_concurrency_info (line 269) | static DWORD (WINAPI *TBB_GetActiveProcessorCount)( WORD groupInde...
        function NumberOfProcessorGroups (line 347) | int NumberOfProcessorGroups() {
        function FindProcessorGroupIndex (line 352) | int FindProcessorGroupIndex ( int procIdx ) {
        function MoveThreadIntoProcessorGroup (line 377) | void MoveThreadIntoProcessorGroup( void* hThread, int groupIndex ) {
        function AvailableHwConcurrency (line 385) | int AvailableHwConcurrency() {

FILE: src/tbb/src/tbb/observer_proxy.cpp
  type tbb (line 27) | namespace tbb {
    type detail (line 28) | namespace detail {
      type r1 (line 29) | namespace r1 {
    type internal (line 322) | namespace internal {
  type tbb (line 321) | namespace tbb {
    type detail (line 28) | namespace detail {
      type r1 (line 29) | namespace r1 {
    type internal (line 322) | namespace internal {

FILE: src/tbb/src/tbb/observer_proxy.h
  function namespace (line 28) | namespace r1 {

FILE: src/tbb/src/tbb/parallel_pipeline.cpp
  type tbb (line 26) | namespace tbb {
    type detail (line 27) | namespace detail {
      type r1 (line 28) | namespace r1 {
        class pipeline (line 36) | class pipeline {
          method pipeline (line 41) | pipeline(d1::task_group_context& cxt, std::size_t max_token) :
          method fill_pipeline (line 57) | void fill_pipeline(const d1::filter_node& root) {
        type task_info (line 91) | struct task_info {
          method reset (line 100) | void reset() {
        class input_buffer (line 110) | class input_buffer {
          method input_buffer (line 152) | input_buffer(const input_buffer&) = delete;
          method input_buffer (line 153) | input_buffer& operator=(const input_buffer&) = delete;
          method input_buffer (line 156) | input_buffer( bool ordered) :
          method Token (line 179) | Token get_ordered_token(){
          method try_put_token (line 187) | bool try_put_token( task_info& info ) {
          method try_to_spawn_task_for_next_token (line 216) | void try_to_spawn_task_for_next_token(StageTask& spawner, d1::ex...
          method create_my_tls (line 231) | void create_my_tls() {
          method destroy_my_tls (line 237) | void destroy_my_tls() {
          method my_tls_end_of_input (line 242) | bool my_tls_end_of_input() {
          method set_my_tls_end_of_input (line 245) | void set_my_tls_end_of_input() {
        class stage_task (line 268) | class stage_task : public d1::task, public task_info {
          method try_spawn_stage_task (line 281) | void try_spawn_stage_task(d1::execution_data& ed) {
          method stage_task (line 293) | stage_task(pipeline& pipeline, d1::small_object_allocator& alloc...
          method stage_task (line 303) | stage_task(pipeline& pipeline, d1::base_filter* filter, const ta...
          method reset (line 313) | void reset() {
          method finalize (line 318) | void finalize(d1::execution_data& ed) {
          method task (line 322) | task* execute(d1::execution_data& ed) override {
          method task (line 329) | task* cancel(d1::execution_data& ed) override {
          method spawn_stage_task (line 342) | void spawn_stage_task(const task_info& info, d1::execution_data&...

FILE: src/tbb/src/tbb/permit_manager.h
  function namespace (line 24) | namespace tbb {

FILE: src/tbb/src/tbb/pm_client.h
  function namespace (line 22) | namespace tbb {

FILE: src/tbb/src/tbb/private_server.cpp
  type tbb (line 30) | namespace tbb {
    type detail (line 31) | namespace detail {
      type r1 (line 32) | namespace r1 {
        type rml (line 33) | namespace rml {
          class private_server (line 38) | class private_server
            method propagate_chain_reaction (line 156) | void propagate_chain_reaction() {
            method remove_server_ref (line 170) | void remove_server_ref() {
            method version_type (line 182) | version_type version() const override {
            method request_close_connection (line 186) | void request_close_connection( bool /*exiting*/ ) override {
            method yield (line 192) | void yield() override { d0::yield(); }
            method independent_thread_number_changed (line 194) | void independent_thread_number_changed( int ) override {__TBB_...
            method default_concurrency (line 196) | unsigned default_concurrency() const override { return governo...
            method register_external_thread (line 201) | void register_external_thread ( ::rml::server::execution_resou...
            method unregister_external_thread (line 202) | void unregister_external_thread ( ::rml::server::execution_res...
          class private_worker (line 40) | class private_worker: no_copy {
            type state_t (line 49) | enum state_t {
            method private_worker (line 97) | private_worker( private_server& server, tbb_client& client, co...
          class padded_private_worker (line 110) | class padded_private_worker: public private_worker {
            method padded_private_worker (line 113) | padded_private_worker( private_server& server, tbb_client& cli...
          class private_server (line 120) | class private_server: public tbb_server, no_copy {
            method propagate_chain_reaction (line 156) | void propagate_chain_reaction() {
            method remove_server_ref (line 170) | void remove_server_ref() {
            method version_type (line 182) | version_type version() const override {
            method request_close_connection (line 186) | void request_close_connection( bool /*exiting*/ ) override {
            method yield (line 192) | void yield() override { d0::yield(); }
            method independent_thread_number_changed (line 194) | void independent_thread_number_changed( int ) override {__TBB_...
            method default_concurrency (line 196) | unsigned default_concurrency() const override { return governo...
            method register_external_thread (line 201) | void register_external_thread ( ::rml::server::execution_resou...
            method unregister_external_thread (line 202) | void unregister_external_thread ( ::rml::server::execution_res...
          function __RML_DECL_THREAD_ROUTINE (line 216) | __attribute__((force_align_arg_pointer))
          function tbb_server (line 428) | tbb_server* make_private_server( tbb_client& client ) {

FILE: src/tbb/src/tbb/profiling.cpp
  type tbb (line 27) | namespace tbb {
    type detail (line 28) | namespace detail {
      type r1 (line 29) | namespace r1 {
        type resource_string (line 37) | struct resource_string {
        function __itt_string_handle (line 52) | static __itt_string_handle* ITT_get_string_handle(std::uintptr_t i...
        function ITT_init_domains (line 57) | static void ITT_init_domains() {
        function ITT_init_strings (line 66) | static void ITT_init_strings() {
        function ITT_init (line 76) | static void ITT_init() {
        function ITT_DoUnsafeOneTimeInitialization (line 83) | void ITT_DoUnsafeOneTimeInitialization () {
        function ITT_DoOneTimeInitialization (line 96) | void ITT_DoOneTimeInitialization() {
        function create_itt_sync (line 104) | void create_itt_sync(void* ptr, const tchar* objtype, const tchar*...
        function call_itt_notify (line 108) | void call_itt_notify(int t, void *ptr) {
        function itt_set_sync_name (line 118) | void itt_set_sync_name(void* obj, const tchar* name) {
        function __itt_domain (line 124) | static inline __itt_domain* get_itt_domain(d1::itt_domain_enum idx) {
        function itt_id_make (line 131) | static inline void itt_id_make(__itt_id* id, void* addr, unsigned ...
        function itt_id_create (line 135) | static inline void itt_id_create(const __itt_domain* domain, __itt...
        function itt_make_task_group (line 139) | void itt_make_task_group(d1::itt_domain_enum domain, void* group, ...
        function create_itt_sync (line 238) | void create_itt_sync(void* /*ptr*/, const tchar* /*objtype*/, cons...
        function call_itt_notify (line 239) | void call_itt_notify(int /*t*/, void* /*ptr*/) {}
        function itt_set_sync_name (line 240) | void itt_set_sync_name(void* /*obj*/, const tchar* /*name*/) {}
        function itt_make_task_group (line 241) | void itt_make_task_group(d1::itt_domain_enum /*domain*/, void* /*g...
        function itt_metadata_str_add (line 243) | void itt_metadata_str_add(d1::itt_domain_enum /*domain*/, void* /*...
        function itt_metadata_ptr_add (line 245) | void itt_metadata_ptr_add(d1::itt_domain_enum /*domain*/, void * /...
        function itt_relation_add (line 247) | void itt_relation_add(d1::itt_domain_enum /*domain*/, void* /*addr...
        function itt_task_begin (line 249) | void itt_task_begin(d1::itt_domain_enum /*domain*/, void* /*task*/...
        function itt_task_end (line 251) | void itt_task_end(d1::itt_domain_enum /*domain*/ ) { }
        function itt_region_begin (line 252) | void itt_region_begin(d1::itt_domain_enum /*domain*/, void* /*regi...
        function itt_region_end (line 254) | void itt_region_end(d1::itt_domain_enum /*domain*/, void* /*region...

FILE: src/tbb/src/tbb/queuing_rw_mutex.cpp
  type tbb (line 26) | namespace tbb {
    type detail (line 27) | namespace detail {
      type r1 (line 28) | namespace r1 {
        class tricky_atomic_pointer (line 38) | class tricky_atomic_pointer {
          method T (line 42) | static T* fetch_add( std::atomic<word>& location, word addend, s...
          method T (line 46) | static T* exchange( std::atomic<word>& location, T* value, std::...
          method T (line 50) | static T* compare_exchange_strong( std::atomic<word>& obj, const...
          method store (line 56) | static void store( std::atomic<word>& location, const T* value, ...
          method T (line 60) | static T* load( std::atomic<word>& location, std::memory_order m...
          method spin_wait_while_eq (line 64) | static void spin_wait_while_eq(const std::atomic<word>& location...
          method tricky_atomic_pointer (line 69) | tricky_atomic_pointer( T*& original ) : ref(original) {}
          method tricky_atomic_pointer (line 70) | tricky_atomic_pointer(const tricky_atomic_pointer&) = delete;
          method tricky_atomic_pointer (line 71) | tricky_atomic_pointer& operator=(const tricky_atomic_pointer&) =...
          method T (line 72) | T* operator&( const word operand2 ) const {
          method T (line 75) | T* operator|( const word operand2 ) const {
        type state_t_flags (line 88) | enum state_t_flags : unsigned char {
        type queuing_rw_mutex_impl (line 105) | struct queuing_rw_mutex_impl {
          method try_acquire_internal_lock (line 108) | static bool try_acquire_internal_lock(d1::queuing_rw_mutex::scop...
          method acquire_internal_lock (line 115) | static void acquire_internal_lock(d1::queuing_rw_mutex::scoped_l...
          method release_internal_lock (line 125) | static void release_internal_lock(d1::queuing_rw_mutex::scoped_l...
          method wait_for_release_of_internal_lock (line 131) | static void wait_for_release_of_internal_lock(d1::queuing_rw_mut...
          method unblock_or_wait_on_internal_lock (line 137) | static void unblock_or_wait_on_internal_lock(d1::queuing_rw_mute...
          method get_flag (line 149) | static uintptr_t get_flag( d1::queuing_rw_mutex::scoped_lock* pt...
          method acquire (line 158) | static void acquire(d1::queuing_rw_mutex& m, d1::queuing_rw_mute...
          method try_acquire (line 254) | static bool try_acquire(d1::queuing_rw_mutex& m, d1::queuing_rw_...
          method release (line 281) | static void release(d1::queuing_rw_mutex::scoped_lock& s) {
          method downgrade_to_reader (line 414) | static bool downgrade_to_reader(d1::queuing_rw_mutex::scoped_loc...
          method upgrade_to_writer (line 456) | static bool upgrade_to_writer(d1::queuing_rw_mutex::scoped_lock&...
          method is_writer (line 577) | static bool is_writer(const d1::queuing_rw_mutex::scoped_lock& m) {
          method construct (line 581) | static void construct(d1::queuing_rw_mutex& m) {

FILE: src/tbb/src/tbb/rml_base.h
  function class (line 38) | class versioned_object {
  function class (line 55) | class job {
  function class (line 61) | class client: public versioned_object {

FILE: src/tbb/src/tbb/rml_tbb.cpp
  type tbb (line 22) | namespace tbb {
    type detail (line 23) | namespace detail {
      type r1 (line 24) | namespace r1 {
        type rml (line 25) | namespace rml {

FILE: src/tbb/src/tbb/rml_tbb.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbb/rml_thread_monitor.h
  type HANDLE (line 95) | typedef HANDLE handle_type;
  type pthread_t (line 104) | typedef pthread_t handle_type;
  function detach_thread (line 170) | void thread_monitor::detach_thread(handle_type handle) {

FILE: src/tbb/src/tbb/rtm_mutex.cpp
  type tbb (line 25) | namespace tbb {
    type detail (line 26) | namespace detail {
      type r1 (line 27) | namespace r1 {
        type rtm_mutex_impl (line 30) | struct rtm_mutex_impl {
          method release (line 37) | static void release(d1::rtm_mutex::scoped_lock& s) {
          method acquire (line 58) | static void acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock...
          method try_acquire (line 92) | static bool try_acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_...

FILE: src/tbb/src/tbb/rtm_rw_mutex.cpp
  type tbb (line 25) | namespace tbb {
    type detail (line 26) | namespace detail {
      type r1 (line 27) | namespace r1 {
        type rtm_rw_mutex_impl (line 29) | struct rtm_rw_mutex_impl {
          method release (line 37) | static void release(d1::rtm_rw_mutex::scoped_lock& s) {
          method acquire_writer (line 66) | static void acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex...
          method acquire_reader (line 106) | static void acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex...
          method upgrade (line 151) | static bool upgrade(d1::rtm_rw_mutex::scoped_lock& s) {
          method downgrade (line 180) | static bool downgrade(d1::rtm_rw_mutex::scoped_lock& s) {
          method try_acquire_writer (line 202) | static bool try_acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_m...
          method try_acquire_reader (line 221) | static bool try_acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_m...

FILE: src/tbb/src/tbb/scheduler_common.h
  function namespace (line 58) | namespace tbb {
  function finilize_resume (line 398) | void finilize_resume() {
  function try_notify_resume (line 409) | bool try_notify_resume() {
  function recall_owner (line 414) | void recall_owner() {
  type resume_task (line 420) | struct resume_task
  function explicit (line 422) | explicit resume_task(task_dispatcher& target) : m_target(target) {
  type class (line 452) | enum class
  type properties (line 467) | struct properties {
  function critical_task_allowed (line 470) | bool critical_task_allowed{ true };

FILE: src/tbb/src/tbb/semaphore.cpp
  type tbb (line 23) | namespace tbb {
    type detail (line 24) | namespace detail {
      type r1 (line 25) | namespace r1 {
        function init_binsem_using_event (line 32) | void WINAPI init_binsem_using_event( SRWLOCK* h_ )
        function acquire_binsem_using_event (line 38) | void WINAPI acquire_binsem_using_event( SRWLOCK* h_ )
        function release_binsem_using_event (line 44) | void WINAPI release_binsem_using_event( SRWLOCK* h_ )
        function init_concmon_module (line 61) | inline void init_concmon_module()

FILE: src/tbb/src/tbb/semaphore.h
  function namespace (line 90) | namespace tbb {

FILE: src/tbb/src/tbb/small_object_pool.cpp
  type tbb (line 26) | namespace tbb {
    type detail (line 27) | namespace detail {
      type r1 (line 28) | namespace r1 {

FILE: src/tbb/src/tbb/small_object_pool_impl.h
  function namespace (line 28) | namespace tbb {

FILE: src/tbb/src/tbb/task.cpp
  type tbb (line 32) | namespace tbb {
    type detail (line 33) | namespace detail {
      type r1 (line 34) | namespace r1 {
        function suspend (line 41) | void suspend(suspend_callback_type suspend_callback, void* user_ca...
        function resume (line 47) | void resume(suspend_point_type* sp) {
        function suspend_point_type (line 75) | suspend_point_type* current_suspend_point() {
        function task_dispatcher (line 80) | task_dispatcher& create_coroutine(thread_data& td) {
        function suspend (line 201) | void suspend(suspend_callback_type, void*) {
        function resume (line 205) | void resume(suspend_point_type*) {
        function suspend_point_type (line 209) | suspend_point_type* current_suspend_point() {
        function notify_waiters (line 216) | void notify_waiters(std::uintptr_t wait_ctx_addr) {

FILE: src/tbb/src/tbb/task_dispatcher.cpp
  type tbb (line 20) | namespace tbb {
    type detail (line 21) | namespace detail {
      type r1 (line 22) | namespace r1 {
        function spawn_and_notify (line 24) | static inline void spawn_and_notify(d1::task& t, arena_slot* slot,...
        function co_local_wait_for_all (line 188) | void co_local_wait_for_all(unsigned hi, unsigned lo) noexcept

FILE: src/tbb/src/tbb/task_dispatcher.h
  function namespace (line 40) | namespace tbb {

FILE: src/tbb/src/tbb/task_group_context.cpp
  type tbb (line 28) | namespace tbb {
    type detail (line 29) | namespace detail {
      type r1 (line 30) | namespace r1 {
        function tbb_exception_ptr (line 35) | tbb_exception_ptr* tbb_exception_ptr::allocate() noexcept {

FILE: src/tbb/src/tbb/task_stream.h
  function queue_and_mutex (line 46) | alignas(max_nfs_size) queue_and_mutex {
  function set_one_bit (line 56) | inline void set_one_bit( std::atomic<population_t>& dest, int pos ) {
  function clear_one_bit (line 62) | inline void clear_one_bit( std::atomic<population_t>& dest, int pos ) {
  function is_bit_set (line 68) | inline bool is_bit_set( population_t val, int pos ) {
  type random_lane_selector (line 74) | struct random_lane_selector
  function no_assign (line 76) | no_assign
  type lane_selector_base (line 90) | struct lane_selector_base
  function no_assign (line 92) | no_assign
  function lane_selector_base (line 101) | struct subsequent_lane_selector : lane_selector_base {
  function lane_selector_base (line 109) | struct preceding_lane_selector : lane_selector_base {
  function lane_t (line 151) | lane_t* lanes{nullptr};

FILE: src/tbb/src/tbb/tcm.h
  type tcm_result_t (line 29) | typedef enum _tcm_result_t {
  type tcm_permit_states_t (line 37) | enum tcm_permit_states_t {
  type tcm_permit_state_t (line 45) | typedef uint8_t tcm_permit_state_t;
  type tcm_permit_flags_t (line 49) | typedef struct _tcm_permit_flags_t {
  type tcm_callback_flags_t (line 57) | typedef struct _tcm_callback_flags_t {
  type hwloc_bitmap_s (line 65) | struct hwloc_bitmap_s
  type hwloc_bitmap_s (line 66) | struct hwloc_bitmap_s
  type hwloc_bitmap_t (line 67) | typedef hwloc_bitmap_t tcm_cpu_mask_t;
  type tcm_client_id_t (line 71) | typedef uint64_t tcm_client_id_t;
  type tcm_permit_t (line 75) | typedef struct _tcm_permit_t {
  type tcm_permit_rep_t (line 85) | struct tcm_permit_rep_t
  type tcm_numa_node_t (line 89) | typedef int32_t tcm_numa_node_t;
  type tcm_core_type_t (line 90) | typedef int32_t tcm_core_type_t;
  type tcm_cpu_constraints_t (line 98) | typedef struct _tcm_cpu_constraints_t {
  type tcm_request_priorities_t (line 109) | enum tcm_request_priorities_t {
  type tcm_request_priority_t (line 115) | typedef int32_t tcm_request_priority_t;
  type tcm_permit_request_t (line 122) | typedef struct _tcm_permit_request_t {
  type tcm_result_t (line 134) | typedef tcm_result_t (*tcm_callback_t)(tcm_permit_handle_t p, void* call...

FILE: src/tbb/src/tbb/tcm_adaptor.cpp
  type tbb (line 29) | namespace tbb {
    type detail (line 30) | namespace detail {
      type r1 (line 31) | namespace r1 {
        class tcm_client (line 97) | class tcm_client : public pm_client {
          method tcm_client (line 100) | tcm_client(tcm_adaptor& adaptor, arena& a) : pm_client(a), my_tc...
          method update_concurrency (line 110) | int update_concurrency(uint32_t concurrency) {
          method priority_level (line 114) | unsigned priority_level() {
          method tcm_permit_request_t (line 118) | tcm_permit_request_t& permit_request() {
          method tcm_permit_handle_t (line 122) | tcm_permit_handle_t& permit_handle() {
          method actualize_permit (line 126) | void actualize_permit() {
          method request_permit (line 150) | void request_permit(tcm_client_id_t client_id) {
          method deactivate_permit (line 167) | void deactivate_permit() {
          method init (line 173) | void init(tcm_client_id_t client_id, d1::constraints& constraint...
          method register_thread (line 201) | void register_thread() override {
          method unregister_thread (line 207) | void unregister_thread() override {
        type tcm_adaptor_impl (line 225) | struct tcm_adaptor_impl {
          method tcm_adaptor_impl (line 230) | tcm_adaptor_impl(tcm_client_id_t id) : client_id(id)
        function tcm_result_t (line 238) | tcm_result_t renegotiation_callback(tcm_permit_handle_t, void* cli...
        function pm_client (line 283) | pm_client* tcm_adaptor::create_client(arena& a) {

FILE: src/tbb/src/tbb/tcm_adaptor.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbb/thread_control_monitor.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbb/thread_data.h
  function namespace (line 35) | namespace tbb {

FILE: src/tbb/src/tbb/thread_dispatcher.cpp
  type tbb (line 20) | namespace tbb {
    type detail (line 21) | namespace detail {
      type r1 (line 22) | namespace r1 {
        function thread_dispatcher_client (line 37) | thread_dispatcher_client* thread_dispatcher::select_next_client(th...
        function thread_dispatcher_client (line 52) | thread_dispatcher_client* thread_dispatcher::create_client(arena& ...
        function thread_dispatcher_client (line 134) | thread_dispatcher_client* thread_dispatcher::client_in_need(client...
        function thread_dispatcher_client (line 159) | thread_dispatcher_client* thread_dispatcher::client_in_need(thread...

FILE: src/tbb/src/tbb/thread_dispatcher.h
  function namespace (line 31) | namespace tbb {

FILE: src/tbb/src/tbb/thread_dispatcher_client.h
  function namespace (line 23) | namespace tbb {

FILE: src/tbb/src/tbb/thread_request_serializer.cpp
  type tbb (line 20) | namespace tbb {
    type detail (line 21) | namespace detail {
      type r1 (line 22) | namespace r1 {

FILE: src/tbb/src/tbb/thread_request_serializer.h
  function namespace (line 27) | namespace r1 {

FILE: src/tbb/src/tbb/threading_control.cpp
  type tbb (line 25) | namespace tbb {
    type detail (line 26) | namespace detail {
      type r1 (line 27) | namespace r1 {
        function threading_control_client (line 115) | threading_control_client threading_control_impl::create_client(are...
        function thread_control_monitor (line 171) | thread_control_monitor& threading_control_impl::get_waiting_thread...
        function threading_control (line 204) | threading_control* threading_control::get_threading_control(bool i...
        function threading_control (line 213) | threading_control* threading_control::create_threading_control() {
        function threading_control (line 292) | threading_control* threading_control::register_public_reference() {
        function threading_control_client (line 311) | threading_control_client threading_control::create_client(arena& a) {
        function thread_control_monitor (line 405) | thread_control_monitor& threading_control::get_waiting_threads_mon...

FILE: src/tbb/src/tbb/threading_control.h
  type client_snapshot (line 52) | struct client_snapshot {
  function class (line 93) | class threading_control {

FILE: src/tbb/src/tbb/threading_control_client.h
  function namespace (line 22) | namespace tbb {

FILE: src/tbb/src/tbb/tls.h
  function namespace (line 28) | namespace tbb {

FILE: src/tbb/src/tbb/tools_api/ittnotify.h
  type __itt_collection_scope (line 340) | typedef enum {
  type __itt_pt_region (line 401) | typedef unsigned char __itt_pt_region;
  type __itt_suppress_mode_t (line 633) | typedef enum __itt_suppress_mode {
  type __itt_collection_state (line 642) | typedef enum {
  type __itt_model_disable (line 1093) | typedef enum {
  type __itt_domain (line 1814) | typedef struct ___itt_domain
  type __itt_id (line 1905) | typedef struct ___itt_id
  function ITTAPI (line 1927) | ITTAPI __itt_id_make(void* addr, unsigned long long extra)
  type __itt_string_handle (line 2003) | typedef struct ___itt_string_handle
  type __itt_timestamp (line 2085) | typedef unsigned long long __itt_timestamp;
  type __itt_scope (line 2398) | typedef enum
  type __itt_metadata_type (line 2460) | typedef enum {
  type __itt_relation (line 2675) | typedef enum
  type __itt_clock_info (line 2732) | typedef struct ___itt_clock_info
  type __itt_clock_domain (line 2748) | typedef struct ___itt_clock_domain
  type ___itt_counter (line 2934) | struct ___itt_counter
  type __itt_track_group_type (line 3357) | typedef enum ___itt_track_group_type
  type __itt_track_group (line 3366) | typedef struct ___itt_track_group
  type __itt_track_type (line 3383) | typedef enum ___itt_track_type
  type __itt_track (line 3394) | typedef struct ___itt_track
  type __itt_event (line 3476) | typedef int __itt_event;
  type __itt_av_data_type (line 3592) | typedef enum
  type __itt_module_type (line 3782) | typedef enum
  type __itt_section_type (line 3791) | typedef enum
  type __itt_section_info (line 3839) | typedef struct ___itt_section_info
  type __itt_module_object (line 3857) | typedef struct ___itt_module_object
  type __itt_histogram (line 3932) | typedef struct ___itt_histogram
  type __itt_context_type (line 4125) | typedef enum {
  type __itt_context_metadata (line 4161) | typedef struct ___itt_context_metadata
  type __itt_counter_metadata (line 4173) | typedef struct ___itt_counter_metadata
  type __itt_mark_type (line 4284) | typedef int __itt_mark_type;
  type ___itt_caller (line 4538) | struct ___itt_caller
  type __itt_error_code (line 4629) | typedef enum __itt_error_code

FILE: src/tbb/src/tbb/tools_api/ittnotify_config.h
  type HMODULE (line 259) | typedef HMODULE           lib_t;
  type DWORD (line 260) | typedef DWORD             TIDT;
  type CRITICAL_SECTION (line 261) | typedef CRITICAL_SECTION  mutex_t;
  type pthread_t (line 281) | typedef pthread_t         TIDT;
  type pthread_mutex_t (line 282) | typedef pthread_mutex_t   mutex_t;
  function __itt_interlocked_increment (line 306) | ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
  function __itt_interlocked_compare_exchange (line 312) | ITT_INLINE long
  function __TBB_machine_fetchadd4 (line 384) | ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend)
  function __itt_interlocked_increment (line 399) | ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
  function __itt_interlocked_compare_exchange (line 405) | ITT_INLINE long
  type __itt_thread_state (line 444) | typedef enum {
  type __itt_thread_info (line 451) | typedef struct ___itt_thread_info
  type __itt_api_info_20101001 (line 468) | typedef struct ___itt_api_info_20101001
  type __itt_api_info (line 476) | typedef struct ___itt_api_info
  type __itt_counter_info_t (line 485) | typedef struct __itt_counter_info
  type ___itt_domain (line 506) | struct ___itt_domain
  type ___itt_string_handle (line 507) | struct ___itt_string_handle
  type ___itt_histogram (line 508) | struct ___itt_histogram
  type ___itt_counter_metadata (line 509) | struct ___itt_counter_metadata
  type __itt_global (line 513) | typedef struct ___itt_global

FILE: src/tbb/src/tbb/tools_api/ittnotify_static.c
  type __itt_group_alias (line 243) | typedef struct ___itt_group_alias
  function __itt_report_error (line 329) | static void __itt_report_error(int code, ...)
  function __itt_domain (line 353) | static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),...
  function __itt_string_handle (line 477) | static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_ha...
  function __itt_counter (line 569) | static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW)...
  function __itt_counter (line 612) | static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),...
  function __itt_counter (line 666) | static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_t...
  function __itt_counter (line 708) | static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_t...
  function __itt_histogram (line 761) | static __itt_histogram* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_cre...
  function __itt_counter (line 855) | static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW_...
  function __itt_counter (line 897) | static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_v...
  function else (line 1007) | else if (type >= __itt_context_tid && type <= __itt_context_cpu_cycles_f...
  function __itt_group_id (line 1390) | static __itt_group_id __itt_get_groups(void)
  function __itt_lib_version (line 1439) | static int __itt_lib_version(lib_t lib)
  function __itt_nullify_all_pointers (line 1460) | static void __itt_nullify_all_pointers(void)
  function __itt_is_collector_available (line 1468) | static int __itt_is_collector_available(void)
  function ITT_EXTERN_C (line 1491) | ITT_EXTERN_C void _N_(fini_ittlib)(void)
  function __itt_free_allocated_resources (line 1529) | static void __itt_free_allocated_resources(void)
  function ITT_EXTERN_C (line 1600) | ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id i...
  function ITT_EXTERN_C (line 1734) | ITT_EXTERN_C __itt_error_handler_t* _N_(set_error_handler)(__itt_error_h...
  function ITT_EXTERN_C (line 1756) | ITT_EXTERN_C void _N_(mark_pt_region_begin)(__itt_pt_region region)
  function ITT_EXTERN_C (line 1772) | ITT_EXTERN_C void _N_(mark_pt_region_end)(__itt_pt_region region)
  function ITT_EXTERN_C (line 1788) | ITT_EXTERN_C __itt_collection_state (_N_(get_collection_state))(void)
  function ITT_EXTERN_C (line 1801) | ITT_EXTERN_C void (_N_(release_resources))(void)

FILE: src/tbb/src/tbb/tools_api/ittnotify_types.h
  type __itt_group_id (line 20) | typedef enum ___itt_group_id
  type __itt_group_list (line 46) | typedef struct ___itt_group_list

FILE: src/tbb/src/tbb/tools_api/legacy/ittnotify.h
  type __itt_event (line 625) | typedef int __itt_event;
  type __itt_state_t (line 805) | typedef int __itt_state_t;
  type __itt_obj_state_t (line 808) | typedef enum __itt_obj_state {
  type __itt_thr_state_t (line 815) | typedef enum __itt_thr_state {
  type __itt_obj_prop_t (line 821) | typedef enum __itt_obj_prop {
  type __itt_thr_prop_t (line 827) | typedef enum __itt_thr_prop {
  type __itt_frame_t (line 926) | struct __itt_frame_t

FILE: src/tbb/src/tbb/version.cpp
  function TBB_runtime_interface_version (line 19) | int TBB_runtime_interface_version() {

FILE: src/tbb/src/tbb/waiters.h
  function namespace (line 25) | namespace tbb {

FILE: src/tbb/src/tbbbind/tbb_bind.cpp
  type tbb (line 46) | namespace tbb {
    type detail (line 47) | namespace detail {
      type r1 (line 48) | namespace r1 {
        class system_topology (line 53) | class system_topology {
          type init_stages (line 71) | enum init_stages { uninitialized,
          method intergroup_binding_allowed (line 81) | bool intergroup_binding_allowed(std::size_t groups_num) { return...
          method topology_initialization (line 84) | void topology_initialization(std::size_t groups_num) {
          method numa_topology_parsing (line 130) | void numa_topology_parsing() {
          method core_types_topology_parsing (line 185) | void core_types_topology_parsing() {
          method enforce_hwloc_2_5_runtime_linkage (line 235) | void enforce_hwloc_2_5_runtime_linkage() {
          method initialize (line 248) | void initialize( std::size_t groups_num ) {
          method is_topology_parsed (line 267) | bool is_topology_parsed() { return initialization_state == topol...
          method construct (line 269) | static void construct( std::size_t groups_num ) {
          method system_topology (line 276) | static system_topology& instance() {
          method destroy (line 281) | static void destroy() {
          method fill_topology_information (line 307) | void fill_topology_information(
          method fill_constraints_affinity_mask (line 319) | void fill_constraints_affinity_mask(affinity_mask input_mask, in...
          method fit_num_threads_per_core (line 361) | void fit_num_threads_per_core(affinity_mask result_mask, affinit...
          method get_default_concurrency (line 372) | int get_default_concurrency(int numa_node_index, int core_type_i...
          method affinity_mask (line 383) | affinity_mask allocate_process_affinity_mask() {
          method free_affinity_mask (line 388) | void free_affinity_mask( affinity_mask mask_to_free ) {
          method store_current_affinity_mask (line 392) | void store_current_affinity_mask( affinity_mask current_mask ) {
          method set_affinity_mask (line 400) | void set_affinity_mask( const_affinity_mask mask ) {
        class binding_handler (line 409) | class binding_handler {
          method binding_handler (line 424) | binding_handler( std::size_t size, int numa_node_id, int core_ty...
          method apply_affinity (line 454) | void apply_affinity( unsigned slot_num ) {
          method restore_previous_affinity_mask (line 484) | void restore_previous_affinity_mask( unsigned slot_num ) {
        function TBBBIND_EXPORT (line 495) | TBBBIND_EXPORT void __TBB_internal_initialize_system_topology(
        function TBBBIND_EXPORT (line 507) | TBBBIND_EXPORT binding_handler* __TBB_internal_allocate_binding_ha...
        function TBBBIND_EXPORT (line 512) | TBBBIND_EXPORT void __TBB_internal_deallocate_binding_handler(bind...
        function TBBBIND_EXPORT (line 517) | TBBBIND_EXPORT void __TBB_internal_apply_affinity(binding_handler*...
        function TBBBIND_EXPORT (line 522) | TBBBIND_EXPORT void __TBB_internal_restore_affinity(binding_handle...
        function TBBBIND_EXPORT (line 527) | TBBBIND_EXPORT int __TBB_internal_get_default_concurrency(int numa...
        function __TBB_internal_destroy_system_topology (line 531) | void __TBB_internal_destroy_system_topology() {

FILE: src/tbb/src/tbbmalloc/Customize.h
  function BitScanRev (line 50) | inline intptr_t BitScanRev(uintptr_t x) {
  function isAligned (line 55) | inline bool isAligned(T* arg, uintptr_t alignment) {
  function isPowerOfTwo (line 59) | static inline bool isPowerOfTwo(uintptr_t arg) {
  function isPowerOfTwoAtLeast (line 62) | static inline bool isPowerOfTwoAtLeast(uintptr_t arg, uintptr_t power2) {
  function do_yield (line 66) | inline void do_yield() {
  function namespace (line 85) | namespace rml {
  function namespace (line 93) | namespace tbb {
  type tbb (line 130) | typedef tbb::detail::d1::aggregator_generic<OperationType> type;
  type tbb (line 136) | typedef tbb::detail::d1::aggregated_operation<Derived> type;

FILE: src/tbb/src/tbbmalloc/MapMemory.h
  function UnmapMemory (line 151) | int UnmapMemory(void *area, size_t bytes)
  function UnmapMemory (line 170) | int UnmapMemory(void *area, size_t /*bytes*/)
  function UnmapMemory (line 193) | int UnmapMemory(void *area, size_t /*bytes*/)

FILE: src/tbb/src/tbbmalloc/Statistics.h
  type counter_type (line 21) | enum counter_type {
  type common_counter_type (line 37) | enum common_counter_type {
  type bin_counters (line 53) | struct bin_counters {
  function STAT_increment (line 59) | static inline int STAT_increment(int thread, int bin, int ctr)
  function initStatisticsCollection (line 64) | static inline void initStatisticsCollection() {
  function STAT_print (line 76) | static inline void STAT_print(int thread)

FILE: src/tbb/src/tbbmalloc/Synchronize.h
  function class (line 33) | class MallocMutex : tbb::detail::no_copy {
  function SpinWaitWhileEq (line 78) | inline void SpinWaitWhileEq(const std::atomic<intptr_t>& location, const...
  function SpinWaitUntilEq (line 84) | inline void SpinWaitUntilEq(const std::atomic<intptr_t>& location, const...
  function class (line 90) | class AtomicBackoff {

FILE: src/tbb/src/tbbmalloc/backend.cpp
  type rml (line 21) | namespace rml {
    type internal (line 22) | namespace internal {
      function freeRawMemory (line 46) | int freeRawMemory (void *object, size_t size) {
      class GuardedSize (line 157) | class GuardedSize : tbb::detail::no_copy {
        type State (line 160) | enum State {
        method initLocked (line 169) | void initLocked() { value.store(LOCKED, std::memory_order_release); }
        method makeCoalscing (line 170) | void makeCoalscing() {
        method tryLock (line 174) | size_t tryLock(State state) {
        method unlock (line 187) | void unlock(size_t size) {
        method isLastRegionBlock (line 192) | bool isLastRegionBlock() const { return value.load(std::memory_ord...
      type MemRegion (line 196) | struct MemRegion {
      class BlockMutexes (line 206) | class BlockMutexes {
      class FreeBlock (line 212) | class FreeBlock : BlockMutexes {
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      type LastFreeBlock (line 278) | struct LastFreeBlock : public FreeBlock {
      class ITT_Guard (line 288) | class ITT_Guard {
        method ITT_Guard (line 291) | ITT_Guard(void *p) : ptr(p) {
      function FreeBlock (line 356) | FreeBlock *CoalRequestQ::getAll()
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 386) | FreeBlock *Backend::IndexedBins::getFromBin(int binIdx, BackendSync ...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 573) | FreeBlock *Backend::splitBlock(FreeBlock *fBlock, int num, size_t si...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 637) | FreeBlock *Backend::releaseMemInCaches(intptr_t startModifiedCnt,
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 655) | FreeBlock *Backend::askMemFromOS(size_t blockSize, intptr_t startMod...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 762) | FreeBlock *Backend::IndexedBins::findBlock(int nativeBin, BackendSyn...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 789) | FreeBlock *Backend::genericGetBlock(int num, size_t size, bool needA...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function LargeMemoryBlock (line 862) | LargeMemoryBlock *Backend::getLargeBlock(size_t size)
      function BlockI (line 874) | BlockI *Backend::getSlabBlock(int num) {
      function FreeBlock (line 1042) | FreeBlock *Backend::doCoalesc(FreeBlock *fBlock, MemRegion **mRegion)
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 1227) | FreeBlock *Backend::findBlockInRegion(MemRegion *region, size_t exac...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {
      function FreeBlock (line 1331) | FreeBlock *Backend::addNewRegion(size_t size, MemRegionType memRegTy...
        method FreeBlock (line 226) | FreeBlock *rightNeig(size_t sz) const {
        method FreeBlock (line 230) | FreeBlock *leftNeig(size_t sz) const {
        method initHeader (line 235) | void initHeader() { myL.initLocked(); leftL.initLocked(); }
        method setMeFree (line 236) | void setMeFree(size_t size) { myL.unlock(size); }
        method trySetMeUsed (line 237) | size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }
        method isLastRegionBlock (line 238) | bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }
        method setLeftFree (line 240) | void setLeftFree(size_t sz) { leftL.unlock(sz); }
        method trySetLeftUsed (line 241) | size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock...
        method tryLockBlock (line 243) | size_t tryLockBlock() {
        method markCoalescing (line 256) | void markCoalescing(size_t blockSz) {
        method markUsed (line 262) | void markUsed() {
        method markBlocks (line 267) | static void markBlocks(FreeBlock *fBlock, int num, size_t size) {

FILE: src/tbb/src/tbbmalloc/backend.h
  function class (line 27) | class BackendSync {
  function blockConsumed (line 35) | void blockConsumed() { inFlyBlocks++; }
  function binsModified (line 36) | void binsModified() { binsModifications++; }
  function blockReleased (line 37) | void blockReleased() {
  function class (line 51) | class CoalRequestQ { // queue of free blocks that coalescing was delayed
  function class (line 66) | class MemExtendingSema {
  type MemRegionType (line 90) | enum MemRegionType {
  function class (line 99) | class MemRegionList {
  function class (line 108) | class Backend {

FILE: src/tbb/src/tbbmalloc/backref.cpp
  type rml (line 20) | namespace rml {
    type internal (line 21) | namespace internal {
      type BackRefBlock (line 28) | struct BackRefBlock : public BlockI {
        method BackRefBlock (line 41) | BackRefBlock(const BackRefBlock *blockToUse, intptr_t num) :
        method zeroSet (line 51) | void zeroSet() { memset(static_cast<void*>(this+1), 0, BackRefBloc...
      type BackRefMain (line 58) | struct BackRefMain {
      function initBackRefMain (line 96) | bool initBackRefMain(Backend *backend)
      function destroyBackRefMain (line 125) | void destroyBackRefMain(Backend *backend)
      function BackRefBlock (line 210) | BackRefBlock *BackRefMain::findFreeBlock()
        method BackRefBlock (line 41) | BackRefBlock(const BackRefBlock *blockToUse, intptr_t num) :
        method zeroSet (line 51) | void zeroSet() { memset(static_cast<void*>(this+1), 0, BackRefBloc...
      function setBackRef (line 253) | void setBackRef(BackRefIdx backRefIdx, void *newPtr)
      function BackRefIdx (line 261) | BackRefIdx BackRefIdx::newBackRef(bool largeObj)
      function removeBackRef (line 320) | void removeBackRef(BackRefIdx backRefIdx)

FILE: src/tbb/src/tbbmalloc/frontend.cpp
  type rml (line 56) | namespace rml {
    class MemoryPool (line 57) | class MemoryPool
    type internal (line 58) | namespace internal {
      class Block (line 60) | class Block
        method empty (line 356) | bool empty() const {
        method freeListNonNull (line 367) | bool freeListNonNull() { return freeList; }
        method getSize (line 377) | unsigned int getSize() const {
        method BackRefIdx (line 382) | const BackRefIdx *getBackRefIdx() const { return &backRefIdx; }
        method isStartupAllocObject (line 384) | bool isStartupAllocObject() const { return objectSize == startupAl...
        method checkFreePrecond (line 386) | void checkFreePrecond(const void *object) const {
        method MemoryPool (line 422) | MemoryPool *getMemPool() const { return poolPtr; }
        method markOwned (line 435) | inline void markOwned(TLSData *tls) {
        method markOrphaned (line 440) | inline void markOrphaned() {
      class MemoryPool (line 61) | class MemoryPool
        method MemoryPool (line 266) | MemoryPool() = delete;
        method clearTLS (line 285) | void clearTLS() { extMemPool.tlsPointerKey.setThreadMallocTLS(null...
      function isSolidPtr (line 71) | inline bool isSolidPtr( void* ptr ) {
      function isNotForUse (line 74) | inline bool isNotForUse( void* ptr ) {
      class BootStrapBlocks (line 97) | class BootStrapBlocks {
      class ThreadId (line 109) | class ThreadId {
        method tlsNumber (line 115) | static unsigned int tlsNumber() {
        method init (line 127) | static bool init() {
        method destroy (line 142) | static void destroy() {
        method ThreadId (line 156) | ThreadId() : id(ThreadId::tlsNumber()) {}
        method isCurrentThreadId (line 157) | bool isCurrentThreadId() const { return id == ThreadId::tlsNumber(...
        method getThreadId (line 160) | unsigned int getThreadId() { return ThreadId::tlsNumber(); }
        method getMaxThreadId (line 163) | static unsigned getMaxThreadId() { return ThreadCount.load(std::me...
        method ThreadId (line 188) | ThreadId() : tid(GetMyTID()) {}
        method ThreadId (line 189) | ThreadId(ThreadId &other) = delete;
        method isCurrentThreadId (line 193) | bool isCurrentThreadId() const { return pthread_equal(pthread_self...
        method isCurrentThreadId (line 195) | bool isCurrentThreadId() const { return GetCurrentThreadId() == ti...
        method ThreadId (line 197) | ThreadId& operator=(const ThreadId& other) {
        method init (line 201) | static bool init() { return true; }
        method destroy (line 203) | static void destroy() {}
      function STAT_increment (line 173) | int STAT_increment(ThreadId tid, int bin, int ctr)
      class ThreadId (line 181) | class ThreadId {
        method tlsNumber (line 115) | static unsigned int tlsNumber() {
        method init (line 127) | static bool init() {
        method destroy (line 142) | static void destroy() {
        method ThreadId (line 156) | ThreadId() : id(ThreadId::tlsNumber()) {}
        method isCurrentThreadId (line 157) | bool isCurrentThreadId() const { return id == ThreadId::tlsNumber(...
        method getThreadId (line 160) | unsigned int getThreadId() { return ThreadId::tlsNumber(); }
        method getMaxThreadId (line 163) | static unsigned getMaxThreadId() { return ThreadCount.load(std::me...
        method ThreadId (line 188) | ThreadId() : tid(GetMyTID()) {}
        method ThreadId (line 189) | ThreadId(ThreadId &other) = delete;
        method isCurrentThreadId (line 193) | bool isCurrentThreadId() const { return pthread_equal(pthread_self...
        method isCurrentThreadId (line 195) | bool isCurrentThreadId() const { return GetCurrentThreadId() == ti...
        method ThreadId (line 197) | ThreadId& operator=(const ThreadId& other) {
        method init (line 201) | static bool init() { return true; }
        method destroy (line 203) | static void destroy() {}
      function TLSData (line 236) | inline TLSData* TLSKey::getThreadMallocTLS() const
        method TLSData (line 596) | TLSData(MemoryPool *mPool, Backend *bknd) : memPool(mPool), freeSl...
        method MemoryPool (line 597) | MemoryPool *getMemPool() const { return memPool; }
        method externalCleanup (line 600) | bool externalCleanup(bool cleanOnlyUnused, bool cleanBins) {
        method markUsed (line 611) | void markUsed() { unused.store(false, std::memory_order_relaxed); }
        method markUnused (line 612) | void markUnused() { unused.store(true, std::memory_order_relaxed); }
      class Bin (line 258) | class Bin
        method Block (line 464) | inline Block* getActiveBlock() const { return activeBlk; }
        method resetActiveBlock (line 465) | void resetActiveBlock() { activeBlk = nullptr; }
        method verifyInitState (line 479) | void verifyInitState() const {
      class StartupBlock (line 259) | class StartupBlock
        method availableSize (line 1839) | size_t availableSize() const {
        method msize (line 1845) | static size_t msize(void *ptr) { return *((size_t*)ptr - 1); }
      class MemoryPool (line 261) | class MemoryPool {
        method MemoryPool (line 266) | MemoryPool() = delete;
        method clearTLS (line 285) | void clearTLS() { extMemPool.tlsPointerKey.setThreadMallocTLS(null...
      type PaddingImpl (line 307) | struct PaddingImpl {
      type PaddingImpl<0> (line 312) | struct PaddingImpl<0> {}
      type Padding (line 315) | struct Padding : PaddingImpl<N/sizeof(size_t)> {}
      class GlobalBlockFields (line 319) | class GlobalBlockFields : public BlockI {
      class LocalBlockFields (line 326) | class LocalBlockFields : public GlobalBlockFields, Padding<blockHead...
      class Block (line 353) | class Block : public LocalBlockFields,
        method empty (line 356) | bool empty() const {
        method freeListNonNull (line 367) | bool freeListNonNull() { return freeList; }
        method getSize (line 377) | unsigned int getSize() const {
        method BackRefIdx (line 382) | const BackRefIdx *getBackRefIdx() const { return &backRefIdx; }
        method isStartupAllocObject (line 384) | bool isStartupAllocObject() const { return objectSize == startupAl...
        method checkFreePrecond (line 386) | void checkFreePrecond(const void *object) const {
        method MemoryPool (line 422) | MemoryPool *getMemPool() co
Condensed preview — 399 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,413K chars).
[
  {
    "path": ".Rbuildignore",
    "chars": 306,
    "preview": "^.*\\.Rproj$\n^.travis.yml\n^README.md\n^\\.Rprofile$\n^\\.Rproj\\.user$\n^appveyor\\.yml$\n^check$\n^doc$\n^gen$\n^libs$\n^inst/lib$\n^"
  },
  {
    "path": ".gitattributes",
    "chars": 22,
    "preview": "Makevars  text eol=lf\n"
  },
  {
    "path": ".github/.gitignore",
    "chars": 7,
    "preview": "*.html\n"
  },
  {
    "path": ".github/workflows/R-CMD-check.yaml",
    "chars": 1000,
    "preview": "# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples\n# Need help debugging build failures? Start at"
  },
  {
    "path": ".gitignore",
    "chars": 176,
    "preview": ".Rprofile\n.Rproj.user\n.Rhistory\n.RData\n.DS_Store\ncheck\ninst/doc\ninst/lib\ninst/libs\nlibs\nrevdep\nsrc-i386\nsrc-x64\ntbb.log\n"
  },
  {
    "path": "DESCRIPTION",
    "chars": 1761,
    "preview": "Package: RcppParallel\nType: Package\nTitle: Parallel Programming Tools for 'Rcpp'\nVersion: 5.1.10.9000\nAuthors@R: c(\n    "
  },
  {
    "path": "NAMESPACE",
    "chars": 216,
    "preview": "# Generated by roxygen2: do not edit by hand\n\nexport(CxxFlags)\nexport(LdFlags)\nexport(RcppParallel.package.skeleton)\nexp"
  },
  {
    "path": "NEWS.md",
    "chars": 5995,
    "preview": "\n## RcppParallel 6.0.0  (UNRELEASED)\n\n* RcppParallel no longer includes tbb headers as part of the RcppParallel/TBB.h\n  "
  },
  {
    "path": "R/RcppParallel-package.R",
    "chars": 960,
    "preview": "\n#' Parallel programming tools for Rcpp\n#' \n#' High level functions for doing parallel programming with Rcpp.  For examp"
  },
  {
    "path": "R/aaa.R",
    "chars": 149,
    "preview": "\n# stubs that get overridden via configure script\nTBB_ENABLED <- TRUE\nTBB_LIB  <- \"\"\nTBB_INC  <- \"\"\n\nTBB_NAME <- \"tbb\"\nT"
  },
  {
    "path": "R/flags.R",
    "chars": 1202,
    "preview": "\n#' Compilation flags for RcppParallel\n#'\n#' Output the compiler or linker flags required to build against RcppParallel."
  },
  {
    "path": "R/options.R",
    "chars": 2724,
    "preview": "\n#' Thread options for RcppParallel\n#' \n#' Set thread options (number of threads to use for task scheduling and stack\n#'"
  },
  {
    "path": "R/platform.R",
    "chars": 391,
    "preview": "\nis_windows <- function() {\n   .Platform$OS.type == \"windows\"\n}\n\nis_mac <- function() {\n   Sys.info()[[\"sysname\"]] == \"D"
  },
  {
    "path": "R/plugin.R",
    "chars": 329,
    "preview": "\n# Inline plugin used by sourceCpp.\ninlineCxxPlugin <- function() {\n   \n   list(\n      env = list(\n         PKG_CXXFLAGS"
  },
  {
    "path": "R/skeleton.R",
    "chars": 5046,
    "preview": "\n#' Create a skeleton for a new package depending on RcppParallel\n#' \n#' \\code{RcppParallel.package.skeleton} automates "
  },
  {
    "path": "R/tbb-autodetected.R.in",
    "chars": 142,
    "preview": "\nTBB_ENABLED <- @TBB_ENABLED@\nTBB_LIB  <- \"@TBB_LIB@\"\nTBB_INC  <- \"@TBB_INC@\"\n\nTBB_NAME <- \"@TBB_NAME@\"\nTBB_MALLOC_NAME "
  },
  {
    "path": "R/tbb.R",
    "chars": 3873,
    "preview": "\n#' Get the Path to a TBB Library\n#'\n#' Retrieve the path to a TBB library. This can be useful for \\R packages\n#' using "
  },
  {
    "path": "R/utils.R",
    "chars": 710,
    "preview": "\n# generate paths consumable by the compilers and linkers\n# in particular, on Windows and Solaris, this means the path _"
  },
  {
    "path": "R/zzz.R",
    "chars": 2134,
    "preview": "\n# !diagnostics suppress=.dllInfo,.tbbDllInfo,.tbbMallocDllInfo,.tbbMallocProxyDllInfo\n\n# NOTE: we intentionally do _not"
  },
  {
    "path": "README.md",
    "chars": 3347,
    "preview": "\n## RcppParallel\n\n<!-- badges: start -->\n[![CRAN](https://www.r-pkg.org/badges/version/RcppParallel)](https://cran.r-pro"
  },
  {
    "path": "RcppParallel.Rproj",
    "chars": 419,
    "preview": "Version: 1.0\nProjectId: 8e3d73b0-404c-42f5-b2ef-46f759f65dd4\n\nRestoreWorkspace: No\nSaveWorkspace: No\nAlwaysSaveHistory: "
  },
  {
    "path": "cleanup",
    "chars": 94,
    "preview": "#!/usr/bin/env sh\n: \"${R_HOME=`R RHOME`}\"\n\"${R_HOME}/bin/Rscript\" tools/config.R cleanup \"$@\"\n"
  },
  {
    "path": "cleanup.win",
    "chars": 87,
    "preview": "#!/usr/bin/env sh\n\"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe\" tools/config.R cleanup \"$@\"\n"
  },
  {
    "path": "configure",
    "chars": 96,
    "preview": "#!/usr/bin/env sh\n: \"${R_HOME=`R RHOME`}\"\n\"${R_HOME}/bin/Rscript\" tools/config.R configure \"$@\"\n"
  },
  {
    "path": "configure.win",
    "chars": 89,
    "preview": "#!/usr/bin/env sh\n\"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe\" tools/config.R configure \"$@\"\n"
  },
  {
    "path": "doc/rtools_tbb_notes.md",
    "chars": 7299,
    "preview": "# Differences MinGW / Rtools\r\n\r\n## cmd\r\n\r\n### MinGW\r\n\r\ncmd is an sh wrapper which invokes the 32bit version of Windows' "
  },
  {
    "path": "inst/.gitignore",
    "chars": 11,
    "preview": "lib/\nlibs/\n"
  },
  {
    "path": "inst/include/.gitignore",
    "chars": 90,
    "preview": "\n# These TBB libraries are copied in at configure time.\n/index.html\n/oneapi\n/serial\n/tbb\n\n"
  },
  {
    "path": "inst/include/RcppParallel/Backend.h",
    "chars": 1582,
    "preview": "\n#ifndef __RCPP_PARALLEL_BACKEND__\n#define __RCPP_PARALLEL_BACKEND__\n\n#include <cstdlib>\n#include <cstring>\n\nextern \"C\" "
  },
  {
    "path": "inst/include/RcppParallel/Common.h",
    "chars": 2340,
    "preview": "#ifndef __RCPP_PARALLEL_COMMON__\n#define __RCPP_PARALLEL_COMMON__\n\n#include <cerrno>\n#include <cstddef>\n#include <cstdli"
  },
  {
    "path": "inst/include/RcppParallel/RMatrix.h",
    "chars": 7374,
    "preview": "#ifndef __RCPP_PARALLEL_RMATRIX__\n#define __RCPP_PARALLEL_RMATRIX__\n\n#include <cstddef>\n#include <iterator>\n\nnamespace R"
  },
  {
    "path": "inst/include/RcppParallel/RVector.h",
    "chars": 1358,
    "preview": "#ifndef __RCPP_PARALLEL_RVECTOR__\n#define __RCPP_PARALLEL_RVECTOR__\n\n#include <cstddef>\n\nnamespace RcppParallel {\n\ntempl"
  },
  {
    "path": "inst/include/RcppParallel/TBB.h",
    "chars": 4246,
    "preview": "#ifndef __RCPP_PARALLEL_TBB__\n#define __RCPP_PARALLEL_TBB__\n\n#include \"Common.h\"\n\n#ifndef TBB_PREVIEW_GLOBAL_CONTROL\n# d"
  },
  {
    "path": "inst/include/RcppParallel/Timer.h",
    "chars": 6038,
    "preview": "#ifndef __RCPP_PARALLEL_TIMER__\n#define __RCPP_PARALLEL_TIMER__\n\nnamespace RcppParallel {\n    typedef uint64_t nanotime_"
  },
  {
    "path": "inst/include/RcppParallel/TinyThread.h",
    "chars": 4803,
    "preview": "#ifndef __RCPP_PARALLEL_TINYTHREAD__\n#define __RCPP_PARALLEL_TINYTHREAD__\n\n#include <cstdlib>\n#include <cstdio>\n\n#includ"
  },
  {
    "path": "inst/include/RcppParallel.h",
    "chars": 2433,
    "preview": "\n#ifndef __RCPP_PARALLEL__\n#define __RCPP_PARALLEL__\n\n// TinyThread implementation\n#include \"RcppParallel/TinyThread.h\"\n"
  },
  {
    "path": "inst/include/tthread/fast_mutex.h",
    "chars": 6940,
    "preview": "/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-\nCopyright (c) 2010-2012 Marcus Geelnard\n\nThis software is pro"
  },
  {
    "path": "inst/include/tthread/tinythread.h",
    "chars": 29622,
    "preview": "/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-\nCopyright (c) 2010-2012 Marcus Geelnard\n\nThis software is pro"
  },
  {
    "path": "inst/include/tthread/tinythread.inl",
    "chars": 8618,
    "preview": "/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-\nCopyright (c) 2010-2012 Marcus Geelnard\n\nThis software is pro"
  },
  {
    "path": "inst/presentations/.gitignore",
    "chars": 12,
    "preview": "*.tex\n*.pdf\n"
  },
  {
    "path": "inst/presentations/rcpp_parallel_talk_jan2015.Rmd",
    "chars": 10830,
    "preview": "---\ntitle: \"R, Rcpp and Parallel Computing\"\nauthor: \"Dirk Eddelbuettel and JJ Allaire\"\ndate: \"Jan 26-27, 2015\\\\newline W"
  },
  {
    "path": "inst/rstudio/templates/project/RcppParallel.package.skeleton.dcf",
    "chars": 315,
    "preview": "Binding: RcppParallel.package.skeleton\nTitle: R Package using RcppParallel\nSubtitle: Create a new R Package using RcppPa"
  },
  {
    "path": "inst/skeleton/vector-sum.Rd",
    "chars": 287,
    "preview": "\\name{parallelVectorSum}\n\\alias{parallelVectorSum}\n\\docType{package}\n\\title{\nSimple function using RcppParallel\n}\n\\descr"
  },
  {
    "path": "inst/skeleton/vector-sum.cpp",
    "chars": 1401,
    "preview": "/**\n *\n * This file contains example code showcasing how RcppParallel\n * can be used. In this file, we define and export"
  },
  {
    "path": "inst/tests/cpp/distance.cpp",
    "chars": 4097,
    "preview": "/**\n * @title Parallel Distance Matrix Calculation with RcppParallel\n * @author JJ Allaire and Jim Bullard\n * @license G"
  },
  {
    "path": "inst/tests/cpp/innerproduct.cpp",
    "chars": 1645,
    "preview": "/**\n * @title Computing an Inner Product with RcppParallel\n * @author JJ Allaire\n * @license GPL (>= 2)\n */\n\n#include <R"
  },
  {
    "path": "inst/tests/cpp/sum.cpp",
    "chars": 1202,
    "preview": "/**\n * @title Summing a Vector in Parallel with RcppParallel\n * @author JJ Allaire\n * @license GPL (>= 2)\n */\n\n#include "
  },
  {
    "path": "inst/tests/cpp/transform.cpp",
    "chars": 1619,
    "preview": "/**\n * @title Transforming a Matrix in Parallel using RcppParallel\n * @author JJ Allaire\n * @license GPL (>= 2)\n */\n \n#i"
  },
  {
    "path": "inst/tests/cpp/truefalse_macros.cpp",
    "chars": 664,
    "preview": "/**\n * @title Test for TRUE and FALSE macros\n * @author Travers Ching\n * @license GPL (>= 2)\n */\n\n// TRUE and FALSE macr"
  },
  {
    "path": "inst/tests/runit.distance.R",
    "chars": 309,
    "preview": "\nlibrary(Rcpp)\nlibrary(RUnit)\n\nsourceCpp(system.file(\"tests/cpp/distance.cpp\", package = \"RcppParallel\")) \n\ntest.distanc"
  },
  {
    "path": "inst/tests/runit.innerproduct.R",
    "chars": 286,
    "preview": "\nlibrary(Rcpp)\nlibrary(RUnit)\n\nsourceCpp(system.file(\"tests/cpp/innerproduct.cpp\", package = \"RcppParallel\"))\n\ntest.inne"
  },
  {
    "path": "inst/tests/runit.sum.R",
    "chars": 240,
    "preview": "\nlibrary(Rcpp)\nlibrary(RUnit)\n\nsourceCpp(system.file(\"tests/cpp/sum.cpp\", package = \"RcppParallel\"))\n\ntest.sum <- functi"
  },
  {
    "path": "inst/tests/runit.transform.R",
    "chars": 290,
    "preview": "\nlibrary(Rcpp)\nlibrary(RUnit)\n\nsourceCpp(system.file(\"tests/cpp/transform.cpp\", package = \"RcppParallel\"))\n\ntest.transfo"
  },
  {
    "path": "inst/tests/runit.truefalse_macros.R",
    "chars": 115,
    "preview": "\nlibrary(Rcpp)\nlibrary(RUnit)\n\nsourceCpp(system.file(\"tests/cpp/truefalse_macros.cpp\", package = \"RcppParallel\"))\n\n"
  },
  {
    "path": "man/RcppParallel-package.Rd",
    "chars": 1054,
    "preview": "% Generated by roxygen2: do not edit by hand\n% Please edit documentation in R/RcppParallel-package.R\n\\docType{package}\n\\"
  },
  {
    "path": "man/RcppParallel.package.skeleton.Rd",
    "chars": 2200,
    "preview": "% Generated by roxygen2: do not edit by hand\n% Please edit documentation in R/skeleton.R\n\\name{RcppParallel.package.skel"
  },
  {
    "path": "man/flags.Rd",
    "chars": 1100,
    "preview": "% Generated by roxygen2: do not edit by hand\n% Please edit documentation in R/flags.R\n\\name{flags}\n\\alias{flags}\n\\alias{"
  },
  {
    "path": "man/setThreadOptions.Rd",
    "chars": 1698,
    "preview": "% Generated by roxygen2: do not edit by hand\n% Please edit documentation in R/options.R\n\\name{setThreadOptions}\n\\alias{s"
  },
  {
    "path": "man/tbbLibraryPath.Rd",
    "chars": 643,
    "preview": "% Generated by roxygen2: do not edit by hand\n% Please edit documentation in R/tbb.R\n\\name{tbbLibraryPath}\n\\alias{tbbLibr"
  },
  {
    "path": "patches/windows_arm64.diff",
    "chars": 1705,
    "preview": "diff --git a/src/tbb/build/Makefile.tbb b/src/tbb/build/Makefile.tbb\nindex 8d155f80..c58f4fb1 100644\n--- a/src/tbb/build"
  },
  {
    "path": "src/.gitignore",
    "chars": 38,
    "preview": "*.o\n*.so\n*.dll\n\nMakevars\nMakevars.win\n"
  },
  {
    "path": "src/Makevars.in",
    "chars": 1291,
    "preview": "\n# This needs to expand to something the shell will accept as '$ORIGIN',\n# including a literal '$' (no variable expansio"
  },
  {
    "path": "src/init.cpp",
    "chars": 435,
    "preview": "\n#include <R.h>\n#include <Rinternals.h>\n#include <stdlib.h> // for NULL\n#include <R_ext/Rdynload.h>\n\n/* .Call calls */\ne"
  },
  {
    "path": "src/install.libs.R",
    "chars": 7603,
    "preview": "\n# !diagnostics suppress=R_PACKAGE_DIR,SHLIB_EXT,R_ARCH\n.install.libs <- function(tbbLib) {\n\n   # copy default library\n "
  },
  {
    "path": "src/options.cpp",
    "chars": 704,
    "preview": "\n#include <RcppParallel.h>\n\n#include <Rinternals.h>\n\n#if RCPP_PARALLEL_USE_TBB // TBB support turned on\n\n#include <strin"
  },
  {
    "path": "src/tbb/.gitignore",
    "chars": 644,
    "preview": "# -------- C++ --------\n# Prerequisites\n*.d\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Precompiled Headers\n*.gch\n*"
  },
  {
    "path": "src/tbb/CMakeLists.txt",
    "chars": 14476,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/CODEOWNERS",
    "chars": 959,
    "preview": "# Where component owners are known, add them here.\n\n/oneTBB/src/tbb/ @pavelkumbrasev\n/oneTBB/src/tbb/ @dnmokhov\n/oneTBB/"
  },
  {
    "path": "src/tbb/CODE_OF_CONDUCT.md",
    "chars": 5502,
    "preview": "\n# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make particip"
  },
  {
    "path": "src/tbb/CONTRIBUTING.md",
    "chars": 3437,
    "preview": "<!--\n******************************************************************************\n* \n* Licensed under the Apache Licen"
  },
  {
    "path": "src/tbb/INSTALL.md",
    "chars": 4731,
    "preview": "# Installation from Sources\n\n\n## Prerequisites \n   \n   - Make sure you have installed CMake version 3.1 (or newer) on yo"
  },
  {
    "path": "src/tbb/LICENSE.txt",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "src/tbb/README.md",
    "chars": 4452,
    "preview": "# oneAPI Threading Building Blocks (oneTBB) <img align=\"right\" width=\"200\" height=\"100\" src=\"https://raw.githubuserconte"
  },
  {
    "path": "src/tbb/RELEASE_NOTES.md",
    "chars": 3067,
    "preview": "<!--\n******************************************************************************\n* \n* Licensed under the Apache Licen"
  },
  {
    "path": "src/tbb/SECURITY.md",
    "chars": 3153,
    "preview": "# Security Policy\nAs an open-source project, we understand the importance of and responsibility\nfor security. This Secur"
  },
  {
    "path": "src/tbb/SUPPORT.md",
    "chars": 1507,
    "preview": "<!--\n******************************************************************************\n* \n* Licensed under the Apache Licen"
  },
  {
    "path": "src/tbb/SYSTEM_REQUIREMENTS.md",
    "chars": 3802,
    "preview": "<!--\n******************************************************************************\n* \n* Licensed under the Apache Licen"
  },
  {
    "path": "src/tbb/WASM_Support.md",
    "chars": 4235,
    "preview": "<!--\n******************************************************************************\n* \n* Licensed under the Apache Licen"
  },
  {
    "path": "src/tbb/cmake/README.md",
    "chars": 13149,
    "preview": "# Build System Description\n\nThe project uses CMake* build configuration.\n\nThe following controls are available during th"
  },
  {
    "path": "src/tbb/cmake/android/device_environment_cleanup.cmake",
    "chars": 709,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/android/environment.cmake",
    "chars": 1372,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/android/test_launcher.cmake",
    "chars": 1131,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/AppleClang.cmake",
    "chars": 2132,
    "preview": "# Copyright (c) 2020-2022 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/Clang.cmake",
    "chars": 3760,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/GNU.cmake",
    "chars": 6180,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/Intel.cmake",
    "chars": 1845,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/IntelLLVM.cmake",
    "chars": 1256,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/MSVC.cmake",
    "chars": 3848,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/compilers/QCC.cmake",
    "chars": 725,
    "preview": "# Copyright (c) 2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not"
  },
  {
    "path": "src/tbb/cmake/config_generation.cmake",
    "chars": 6267,
    "preview": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/hwloc_detection.cmake",
    "chars": 2488,
    "preview": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/memcheck.cmake",
    "chars": 4115,
    "preview": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/packaging.cmake",
    "chars": 1085,
    "preview": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/post_install/CMakeLists.txt",
    "chars": 921,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/python/test_launcher.cmake",
    "chars": 1417,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/resumable_tasks.cmake",
    "chars": 1073,
    "preview": "# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not"
  },
  {
    "path": "src/tbb/cmake/sanitize.cmake",
    "chars": 2141,
    "preview": "# Copyright (c) 2020-2022 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/scripts/cmake_gen_github_configs.cmake",
    "chars": 2583,
    "preview": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/suppressions/lsan.suppressions",
    "chars": 65,
    "preview": "# LSAN suppression for ltdl library known issue.\nleak:libltdl.so\n"
  },
  {
    "path": "src/tbb/cmake/suppressions/tsan.suppressions",
    "chars": 158,
    "preview": "# TSAN suppression for known issues.\n# Possible data race during ittnotify initialization. Low impact.\nrace:__itt_nullif"
  },
  {
    "path": "src/tbb/cmake/templates/TBBConfig.cmake.in",
    "chars": 5219,
    "preview": "# Copyright (c) 2017-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/templates/TBBConfigVersion.cmake.in",
    "chars": 912,
    "preview": "# Copyright (c) 2017-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/test_spec.cmake",
    "chars": 1278,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/toolchains/mips.cmake",
    "chars": 1889,
    "preview": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/toolchains/riscv64.cmake",
    "chars": 1351,
    "preview": "# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not"
  },
  {
    "path": "src/tbb/cmake/utils.cmake",
    "chars": 2714,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/cmake/vars_utils.cmake",
    "chars": 2346,
    "preview": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma"
  },
  {
    "path": "src/tbb/include/oneapi/tbb/blocked_range.h",
    "chars": 6453,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/blocked_range2d.h",
    "chars": 3369,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/blocked_range3d.h",
    "chars": 4455,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/blocked_rangeNd.h",
    "chars": 5508,
    "preview": "/*\n    Copyright (c) 2017-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/cache_aligned_allocator.h",
    "chars": 6908,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/collaborative_call_once.h",
    "chars": 9507,
    "preview": "/*\n    Copyright (c) 2021-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/combinable.h",
    "chars": 1969,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_hash_map.h",
    "chars": 71598,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_lru_cache.h",
    "chars": 14126,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_map.h",
    "chars": 13629,
    "preview": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_priority_queue.h",
    "chars": 19549,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_queue.h",
    "chars": 28892,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_set.h",
    "chars": 10454,
    "preview": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_unordered_map.h",
    "chars": 20366,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_unordered_set.h",
    "chars": 16471,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/concurrent_vector.h",
    "chars": 46789,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_aggregator.h",
    "chars": 7628,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_aligned_space.h",
    "chars": 1399,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_allocator_traits.h",
    "chars": 3807,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_assert.h",
    "chars": 2395,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_attach.h",
    "chars": 861,
    "preview": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you"
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_concurrent_queue_base.h",
    "chars": 26229,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_concurrent_skip_list.h",
    "chars": 47124,
    "preview": "/*\n    Copyright (c) 2019-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_concurrent_unordered_base.h",
    "chars": 65083,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_config.h",
    "chars": 20557,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_containers_helpers.h",
    "chars": 2627,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_exception.h",
    "chars": 2427,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_export.h",
    "chars": 1199,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_body_impl.h",
    "chars": 15259,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_cache_impl.h",
    "chars": 16045,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_impl.h",
    "chars": 20465,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_indexer_impl.h",
    "chars": 17624,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_item_buffer_impl.h",
    "chars": 14981,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_join_impl.h",
    "chars": 94825,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_node_impl.h",
    "chars": 33647,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_node_set_impl.h",
    "chars": 10177,
    "preview": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_nodes_deduction.h",
    "chars": 9540,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_tagged_buffer_impl.h",
    "chars": 14907,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_trace_impl.h",
    "chars": 16137,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_flow_graph_types_impl.h",
    "chars": 15935,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_hash_compare.h",
    "chars": 4497,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_intrusive_list_node.h",
    "chars": 1462,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_machine.h",
    "chars": 12962,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_mutex_common.h",
    "chars": 2347,
    "preview": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you"
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_namespace_injection.h",
    "chars": 815,
    "preview": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_node_handle.h",
    "chars": 5173,
    "preview": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_pipeline_filters.h",
    "chars": 16069,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_pipeline_filters_deduction.h",
    "chars": 1550,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_range_common.h",
    "chars": 4643,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_rtm_mutex.h",
    "chars": 4794,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_rtm_rw_mutex.h",
    "chars": 7219,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_scoped_lock.h",
    "chars": 4968,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_segment_table.h",
    "chars": 24982,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_small_object_pool.h",
    "chars": 3574,
    "preview": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_string_resource.h",
    "chars": 3872,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_task.h",
    "chars": 9149,
    "preview": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_task_handle.h",
    "chars": 3712,
    "preview": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_template_helpers.h",
    "chars": 13527,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_utils.h",
    "chars": 14142,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/detail/_waitable_atomic.h",
    "chars": 2951,
    "preview": "/*\n    Copyright (c) 2021-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/enumerable_thread_specific.h",
    "chars": 42628,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/flow_graph.h",
    "chars": 142870,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/flow_graph_abstractions.h",
    "chars": 1446,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/global_control.h",
    "chars": 6413,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/info.h",
    "chars": 3665,
    "preview": "/*\n    Copyright (c) 2019-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/memory_pool.h",
    "chars": 10022,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/mutex.h",
    "chars": 2473,
    "preview": "/*\n    Copyright (c) 2021-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/null_mutex.h",
    "chars": 2149,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/null_rw_mutex.h",
    "chars": 2514,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_for.h",
    "chars": 23505,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_for_each.h",
    "chars": 28368,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_invoke.h",
    "chars": 7784,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_pipeline.h",
    "chars": 5755,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_reduce.h",
    "chars": 37860,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_scan.h",
    "chars": 23288,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/parallel_sort.h",
    "chars": 11544,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/partitioner.h",
    "chars": 27769,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/profiling.h",
    "chars": 10034,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/queuing_mutex.h",
    "chars": 6394,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/queuing_rw_mutex.h",
    "chars": 6634,
    "preview": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/rw_mutex.h",
    "chars": 8087,
    "preview": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you"
  },
  {
    "path": "src/tbb/include/oneapi/tbb/scalable_allocator.h",
    "chars": 11707,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/spin_mutex.h",
    "chars": 3513,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/spin_rw_mutex.h",
    "chars": 7839,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/task.h",
    "chars": 1090,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/task_arena.h",
    "chars": 17681,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/task_group.h",
    "chars": 25613,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/task_scheduler_observer.h",
    "chars": 9755,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/tbb_allocator.h",
    "chars": 3782,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/tbbmalloc_proxy.h",
    "chars": 1907,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/tick_count.h",
    "chars": 3201,
    "preview": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb/version.h",
    "chars": 4312,
    "preview": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  },
  {
    "path": "src/tbb/include/oneapi/tbb.h",
    "chars": 2765,
    "preview": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n  "
  }
]

// ... and 199 more files (download for full content)

About this extraction

This page contains the full source code of the RcppCore/RcppParallel GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 399 files (3.1 MB), approximately 843.2k tokens, and a symbol index with 2106 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!