Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unordered and ordered containers ranges for empty containers #673

Closed
wants to merge 19 commits into from

Commits on Nov 29, 2021

  1. Configuration menu
    Copy the full SHA
    d4202b4 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2021

  1. Fix incorrect definition of assignment operator in containers (#676)

    * Fixed incorrect definitions of assignment operators in associative containers.
    
    This fixes incorrect return types of assignment operators imported from
    base classes. Other than copy and move assignment operators, which are
    generated by the compiler even if imported with a using-declaration,
    the imported operators will be returning a reference to the base class
    instead of the derived class.
    
    Fixes #372.
    
    Signed-off-by: Andrey Semashev <[email protected]>
    Signed-off-by: Ilya Isaev <[email protected]>
    isaevil authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    f01bc32 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d189d3a View commit details
    Browse the repository at this point in the history
  3. Use memalign, posix_memalign and _aligned_malloc to allocate aligned …

    …memory. (#671)
    
    This uses the standard allocator for allocating and freeing memory with
    higher alignment requirements instead of the hand-rolled implementation.
    
    Signed-off-by: Andrey Semashev <[email protected]>
    Lastique authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    51612ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6231a31 View commit details
    Browse the repository at this point in the history
  5. Check the swappable requirement for the parallel_sort algorithm (#656)

    Signed-off-by: Kochin Ivan <[email protected]>
    Ivan Kochin authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    4ef4a93 View commit details
    Browse the repository at this point in the history
  6. Catch exception in lightweight node (#623)

    * Add raii to aggregator to prevent stuck
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * Add test
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * Reuse tbb raii guard
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * Add header
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * execute_and_wait lightweight task
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * remove unused headers
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * remove space
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * remove std::function
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * noexcept lightweight body
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * fix cmake
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * fix space
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * gcc error
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * declval gateway_type
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * new tests
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * template tests
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * macro TBB_USE_EXCEPTIONS
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * Apply suggestions from code review
    
    Co-authored-by: Aleksei Fedotov <[email protected]>
    
    Co-authored-by: Aleksei Fedotov <[email protected]>
    2 people authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    70455c7 View commit details
    Browse the repository at this point in the history
  7. Suppress data race during ittnotify initialization (#659)

    Signed-off-by: Serov, Vladimir <[email protected]>
    Vladimir Serov authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    2aee740 View commit details
    Browse the repository at this point in the history
  8. Restructuring the docs (#683)

    aepanchi authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    3663912 View commit details
    Browse the repository at this point in the history
  9. Deallocate object with based on actual type (#667)

    * Deallocate object with based on actual type
    
    Signed-off-by: Serov, Vladimir <[email protected]>
    Vladimir Serov authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    67c5f1d View commit details
    Browse the repository at this point in the history
  10. Fix limiter_node decrementer (#647)

    * Fix limiter_node decrementer
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * Fix align
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * add new variable for check unused decrements
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * remove iostream
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * remove unnesessary cast
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * align whitespaces
    
    Signed-off-by: Mishin, Ilya <[email protected]>
    
    * Fix whitespace alignment
    
    Signed-off-by: Serov, Vladimir <[email protected]>
    
    * Revert workaround for GCC
    
    Signed-off-by: Serov, Vladimir <[email protected]>
    
    Co-authored-by: Serov, Vladimir <[email protected]>
    2 people authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    4f2a50d View commit details
    Browse the repository at this point in the history
  11. Musl/linux can not use RTLD_DEEPBIND (#684)

    Exclude non-glibc linux systems along with android
    Fixes
    src/tbb/dynamic_link.cpp:417:29: error: use
     of undeclared identifier 'RTLD_DEEPBIND'                                                                                    |             flags = flags | RTLD_DEEPBIND;
    |                             ^
    
    Signed-off-by: Khem Raj <[email protected]>
    kraj authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    17cd2ba View commit details
    Browse the repository at this point in the history
  12. Update README.md (#674)

    * Update README.md
    
    Signed-off-by: Alexandra Epanchinzeva [email protected]
    
    * Update README.md
    
    * Update README.md
    
    * Update README.md
    
    * Update README.md
    
    * Update README.md
    aepanchi authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    21f5f5b View commit details
    Browse the repository at this point in the history
  13. Moving task_group_exptensions out of the preview (#668)

    Moving task_group_exptensions out of the preview
    
    - moved all but :
      - is_inside_task
      - scheduller bypass
    
    - replaced exceptions with asserts for undefined behavior
     - made some flags in the tests non-atomic for TSAN to raise a flag if
    implementation is incorrect
    
    Signed-off-by: Anton Potapov <[email protected]>
    Co-authored-by: Ilya Isaev <[email protected]>
    Co-authored-by: Alex <[email protected]>
    3 people authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    14c3599 View commit details
    Browse the repository at this point in the history
  14. Optimize x86 atomic_fence (#328)

    * Added optimized x86 atomic_fence for gcc-compatible compilers.
    
    On x86 (32 and 64-bit) any lock-prefixed instruction provides sequential
    consistency guarantees for atomic operations and is more efficient than
    mfence.
    
    We are choosing a "lock not" on a dummy byte on the stack for the following
    reasons:
    
     - The "not" instruction does not affect flags or clobber any registers.
       The memory operand is presumably accessible through esp/rsp.
     - The dummy byte variable is at the top of the stack, which is likely
       hot in cache.
     - The dummy variable does not alias any other data on the stack, which
       means the "lock not" instruction won't introduce any false data
       dependencies with prior or following instructions.
    
    In order to avoid various sanitizers and valgrind complaining, we have to
    initialize the dummy variable to zero prior to the operation.
    
    Additionally, for memory orders weaker than seq_cst there is no need for
    any special instructions, and we only need a compiler fence. For the relaxed
    memory order we don't need even that.
    
    This optimization is only enabled for gcc up to version 11. In gcc 11 the
    compiler implements a similar optimization for std::atomic_thread_fence.
    Compilers compatible with gcc (namely, clang up to 13 and icc up to 2021.3.0,
    inclusively) identify themselves as gcc < 11 and also benefit from this
    optimization, as they otherwise generate mfence for
    std::atomic_thread_fence(std::memory_order_seq_cst).
    
    Signed-off-by: Andrey Semashev <[email protected]>
    
    * Removed explicit mfence in atomic_fence on Windows.
    
    The necessary instructions according to the memory order argument
    should already be generated by std::atomic_thread_fence.
    
    Signed-off-by: Andrey Semashev <[email protected]>
    
    * Removed memory order argument from atomic_fence.
    
    The code uses memory_order_seq_cst in all call sites of atomic_fence,
    so remove the argument and simplifiy the implementation a bit. Also, renamed
    the function to make the memory order it implements apparent.
    
    Signed-off-by: Andrey Semashev <[email protected]>
    Lastique authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    747d2d9 View commit details
    Browse the repository at this point in the history
  15. Build issue: GCC 4.8 bug (#693)

    Class template inheritance doesn't work well with function-local types
    Move class definition to global scope
    
    Signed-off-by: Serov, Vladimir <[email protected]>
    Vladimir Serov authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    004f4c5 View commit details
    Browse the repository at this point in the history
  16. Fix issue #687 (test_eh_thread) (#697)

    Signed-off-by: Vladislav Shchapov <[email protected]>
    phprus authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    444b4ee View commit details
    Browse the repository at this point in the history
  17. CMake: convert TBB_SIGNTOOL path TO_CMAKE_PATH (#701)

    Signed-off-by: Veprev, Alexey [email protected]
    AlexVeprev authored and kboyarinov committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    c20aaf9 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f7b9dea View commit details
    Browse the repository at this point in the history