diff --git a/libs/core/algorithms/tests/performance/CMakeLists.txt b/libs/core/algorithms/tests/performance/CMakeLists.txt index e2fe7841e219..ff24e1bf0a91 100644 --- a/libs/core/algorithms/tests/performance/CMakeLists.txt +++ b/libs/core/algorithms/tests/performance/CMakeLists.txt @@ -30,16 +30,6 @@ set(benchmarks transform_reduce_scaling ) -# foreach_report uses tag_invoke-based sender patterns that do not compile with -# Clang < 22 / AppleClang < 18 against the current stdexec. -if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION - VERSION_LESS "22") - OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" - AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18") -) - list(REMOVE_ITEM benchmarks foreach_report) -endif() - foreach(benchmark ${benchmarks}) set(sources ${benchmark}.cpp) diff --git a/libs/core/algorithms/tests/unit/algorithms/CMakeLists.txt b/libs/core/algorithms/tests/unit/algorithms/CMakeLists.txt index 34636c88a396..215740ba0d4f 100644 --- a/libs/core/algorithms/tests/unit/algorithms/CMakeLists.txt +++ b/libs/core/algorithms/tests/unit/algorithms/CMakeLists.txt @@ -161,87 +161,81 @@ if(HPX_WITH_CXX17_STD_EXECUTION_POLICES) set(tests ${tests} foreach_std_policies) endif() -if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - set(tests - ${tests} - adjacentdifference_sender - adjacentfind_sender - all_of_sender - any_of_sender - copy_sender - copyn_sender - count_sender - countif_sender - destroy_sender - destroyn_sender - ends_with_sender - equal_sender - equal_binary_sender - fill_sender - filln_sender - find_sender - findend_sender - findfirstof_sender - findif_sender - findifnot_sender - foreach_sender - foreachn_sender - generate_sender - generaten_sender - is_heap_sender - is_heap_until_sender - includes_sender - is_partitioned_sender - is_sorted_sender - is_sorted_until_sender - lexicographical_compare_sender - max_element_sender - min_element_sender - minmax_element_sender - mismatch_sender - mismatch_binary_sender - move_sender - none_of_sender - partial_sort_sender - reduce_sender - remove_sender - remove_if_sender - replace_sender - replace_if_sender - replace_copy_sender - replace_copy_if_sender - reverse_sender - reverse_copy_sender - rotate_sender - rotate_copy_sender - search_sender - starts_with_sender - swapranges_sender - transform_sender - transform_binary_sender - transform_binary2_sender - transform_reduce_sender - transform_reduce_binary_sender - uninitialized_copy_sender - uninitialized_copyn_sender - uninitialized_default_construct_sender - uninitialized_default_constructn_sender - uninitialized_fill_sender - uninitialized_filln_sender - uninitialized_move_sender - uninitialized_moven_sender - uninitialized_relocate_sender - uninitialized_relocate_backward_sender - uninitialized_relocaten_sender - uninitialized_value_construct_sender - uninitialized_value_constructn_sender - unique_sender - ) -endif() - -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - list(REMOVE_ITEM tests foreach_scheduler) -endif() +set(tests + ${tests} + adjacentdifference_sender + adjacentfind_sender + all_of_sender + any_of_sender + copy_sender + copyn_sender + count_sender + countif_sender + destroy_sender + destroyn_sender + ends_with_sender + equal_sender + equal_binary_sender + fill_sender + filln_sender + find_sender + findend_sender + findfirstof_sender + findif_sender + findifnot_sender + foreach_sender + foreachn_sender + generate_sender + generaten_sender + is_heap_sender + is_heap_until_sender + includes_sender + is_partitioned_sender + is_sorted_sender + is_sorted_until_sender + lexicographical_compare_sender + max_element_sender + min_element_sender + minmax_element_sender + mismatch_sender + mismatch_binary_sender + move_sender + none_of_sender + partial_sort_sender + reduce_sender + remove_sender + remove_if_sender + replace_sender + replace_if_sender + replace_copy_sender + replace_copy_if_sender + reverse_sender + reverse_copy_sender + rotate_sender + rotate_copy_sender + search_sender + starts_with_sender + swapranges_sender + transform_sender + transform_binary_sender + transform_binary2_sender + transform_reduce_sender + transform_reduce_binary_sender + uninitialized_copy_sender + uninitialized_copyn_sender + uninitialized_default_construct_sender + uninitialized_default_constructn_sender + uninitialized_fill_sender + uninitialized_filln_sender + uninitialized_move_sender + uninitialized_moven_sender + uninitialized_relocate_sender + uninitialized_relocate_backward_sender + uninitialized_relocaten_sender + uninitialized_value_construct_sender + uninitialized_value_constructn_sender + unique_sender +) foreach(test ${tests}) set(sources ${test}.cpp) diff --git a/libs/core/algorithms/tests/unit/container_algorithms/CMakeLists.txt b/libs/core/algorithms/tests/unit/container_algorithms/CMakeLists.txt index ef961a094b02..0cfdd3772a7b 100644 --- a/libs/core/algorithms/tests/unit/container_algorithms/CMakeLists.txt +++ b/libs/core/algorithms/tests/unit/container_algorithms/CMakeLists.txt @@ -139,12 +139,6 @@ if(HPX_WITH_CXX20_COROUTINES) set(tests ${tests} for_loop_range_generator) endif() -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - list(REMOVE_ITEM tests adjacentdifference_range_sender foreach_range - foreach_range_sender - ) -endif() - foreach(test ${tests}) set(sources ${test}.cpp) diff --git a/libs/core/execution/tests/unit/CMakeLists.txt b/libs/core/execution/tests/unit/CMakeLists.txt index 819c7bfae08d..19731c5ec9c6 100644 --- a/libs/core/execution/tests/unit/CMakeLists.txt +++ b/libs/core/execution/tests/unit/CMakeLists.txt @@ -8,7 +8,6 @@ set(tests algorithm_as_sender algorithm_bulk algorithm_ensure_started - algorithm_execute algorithm_just algorithm_just_error algorithm_just_stopped @@ -45,28 +44,26 @@ set(tests set(future_then_executor_PARAMETERS THREADS_PER_LOCALITY 4) -if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - foreach(test ${tests}) - set(sources ${test}.cpp) +foreach(test ${tests}) + set(sources ${test}.cpp) - set(${test}_PARAMETERS THREADS_PER_LOCALITY 4) + set(${test}_PARAMETERS THREADS_PER_LOCALITY 4) - source_group("Source Files" FILES ${sources}) + source_group("Source Files" FILES ${sources}) - set(folder_name "Tests/Unit/Modules/Core/Execution") + set(folder_name "Tests/Unit/Modules/Core/Execution") - # add example executable - add_hpx_executable( - ${test}_test INTERNAL_FLAGS - SOURCES ${sources} ${${test}_FLAGS} - EXCLUDE_FROM_ALL - HPX_PREFIX ${HPX_BUILD_PREFIX} - FOLDER ${folder_name} - ) + # add example executable + add_hpx_executable( + ${test}_test INTERNAL_FLAGS + SOURCES ${sources} ${${test}_FLAGS} + EXCLUDE_FROM_ALL + HPX_PREFIX ${HPX_BUILD_PREFIX} + FOLDER ${folder_name} + ) - target_link_libraries(${test}_test PRIVATE hpx_execution_test_utilities) + target_link_libraries(${test}_test PRIVATE hpx_execution_test_utilities) - add_hpx_unit_test("modules.execution" ${test} ${${test}_PARAMETERS}) + add_hpx_unit_test("modules.execution" ${test} ${${test}_PARAMETERS}) - endforeach() -endif() +endforeach() diff --git a/libs/core/execution/tests/unit/algorithm_execute.cpp b/libs/core/execution/tests/unit/algorithm_execute.cpp deleted file mode 100644 index 6bd0e48dc005..000000000000 --- a/libs/core/execution/tests/unit/algorithm_execute.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) 2020 ETH Zurich -// Copyright (c) 2022 Hartmut Kaiser -// -// SPDX-License-Identifier: BSL-1.0 -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -#include "algorithm_test_utils.hpp" - -#include -#include -#include - -#if defined(HPX_CLANG_VERSION) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#endif - -namespace ex = hpx::execution::experimental; - -static std::size_t friend_tag_invoke_schedule_calls = 0; -static std::size_t tag_invoke_execute_calls = 0; - -template -struct execute_example_sender -{ - using is_sender = void; - using sender_concept = ex::sender_t; - - friend env_with_scheduler tag_invoke( - ex::get_env_t, execute_example_sender const&) noexcept - { - return {}; - } - - // clang-format off - template - friend auto tag_invoke(ex::get_completion_signatures_t, - execute_example_sender const&, - Env) -> ex::completion_signatures; - struct operation_state - { - friend void tag_invoke(ex::start_t, operation_state&) noexcept {}; - }; - // clang-format on - - template - friend operation_state tag_invoke( - ex::connect_t, execute_example_sender&&, R&&) noexcept - { - return {}; - } -}; - -struct scheduler_1 -{ - using my_sender = execute_example_sender; - - friend my_sender tag_invoke(ex::schedule_t, scheduler_1) - { - ++friend_tag_invoke_schedule_calls; - return {}; - } - - bool operator==(scheduler_1 const&) const noexcept - { - return true; - } - - bool operator!=(scheduler_1 const&) const noexcept - { - return false; - } -}; - -struct scheduler_2 -{ - using my_sender = execute_example_sender; - - bool operator==(scheduler_2 const&) const noexcept - { - return true; - } - - bool operator!=(scheduler_2 const&) const noexcept - { - return false; - } -}; -scheduler_2::my_sender tag_invoke(ex::schedule_t, scheduler_2) -{ - ++friend_tag_invoke_schedule_calls; - return {}; -} - -template -void tag_invoke(ex::execute_t, scheduler_2, F&&) -{ - ++tag_invoke_execute_calls; -} - -struct f_struct_1 -{ - // clang-format off - void operator()() {}; - // clang-format on -}; - -struct f_struct_2 -{ - // clang-format off - void operator()(int) {}; - // clang-format on -}; - -struct f_struct_3 -{ - // clang-format off - void operator()(int = 42) {}; - // clang-format on -}; - -void f_fun_1() {} - -void f_fun_2(int) {} - -int main() -{ - { - scheduler_1 s1; - ex::execute(s1, f_struct_1{}); - ex::execute(s1, f_struct_3{}); - ex::execute(s1, &f_fun_1); - HPX_TEST_EQ(friend_tag_invoke_schedule_calls, std::size_t(3)); - HPX_TEST_EQ(tag_invoke_execute_calls, std::size_t(0)); - } - - { - scheduler_2 s2; - ex::execute(s2, f_struct_1{}); - ex::execute(s2, f_struct_3{}); - ex::execute(s2, &f_fun_1); - HPX_TEST_EQ(friend_tag_invoke_schedule_calls, std::size_t(3)); - HPX_TEST_EQ(tag_invoke_execute_calls, std::size_t(3)); - } - - return hpx::util::report_errors(); -} - -#if defined(HPX_CLANG_VERSION) -#pragma clang diagnostic pop -#endif diff --git a/libs/core/execution_base/include/hpx/execution_base/stdexec_forward.hpp b/libs/core/execution_base/include/hpx/execution_base/stdexec_forward.hpp index 18c4717d4eef..9f5eff76e67a 100644 --- a/libs/core/execution_base/include/hpx/execution_base/stdexec_forward.hpp +++ b/libs/core/execution_base/include/hpx/execution_base/stdexec_forward.hpp @@ -207,9 +207,6 @@ namespace hpx::execution::experimental { HPX_CXX_CORE_EXPORT using exec::ensure_started; HPX_CXX_CORE_EXPORT using exec::ensure_started_t; - HPX_CXX_CORE_EXPORT using exec::execute; - HPX_CXX_CORE_EXPORT using exec::execute_t; - // Environment queries HPX_CXX_CORE_EXPORT using exec::make_env; HPX_CXX_CORE_EXPORT using exec::make_env_t; diff --git a/libs/core/execution_base/tests/unit/CMakeLists.txt b/libs/core/execution_base/tests/unit/CMakeLists.txt index f308956bea2b..10d0bfbfbae8 100644 --- a/libs/core/execution_base/tests/unit/CMakeLists.txt +++ b/libs/core/execution_base/tests/unit/CMakeLists.txt @@ -22,26 +22,24 @@ if(HPX_WITH_CXX20_COROUTINES) set(tests ${tests} coroutine_traits coroutine_utils) endif() -if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - foreach(test ${tests}) - set(sources ${test}.cpp) +foreach(test ${tests}) + set(sources ${test}.cpp) - source_group("Source Files" FILES ${sources}) + source_group("Source Files" FILES ${sources}) - # add example executable - add_hpx_executable( - ${test}_test INTERNAL_FLAGS - SOURCES ${sources} - NOLIBS - DEPENDENCIES hpx_core ${BOOST_UNDERLYING_THREAD_LIBRARY} - EXCLUDE_FROM_ALL - FOLDER "Tests/Unit/Modules/Core/ExecutionBase" - ) + # add example executable + add_hpx_executable( + ${test}_test INTERNAL_FLAGS + SOURCES ${sources} + NOLIBS + DEPENDENCIES hpx_core ${BOOST_UNDERLYING_THREAD_LIBRARY} + EXCLUDE_FROM_ALL + FOLDER "Tests/Unit/Modules/Core/ExecutionBase" + ) - target_link_libraries(${test}_test PRIVATE hpx_execution_test_utilities) + target_link_libraries(${test}_test PRIVATE hpx_execution_test_utilities) - add_hpx_unit_test("modules.execution_base" ${test} ${${test}_PARAMETERS}) - target_compile_definitions(${test}_test PRIVATE -DHPX_MODULE_STATIC_LINKING) + add_hpx_unit_test("modules.execution_base" ${test} ${${test}_PARAMETERS}) + target_compile_definitions(${test}_test PRIVATE -DHPX_MODULE_STATIC_LINKING) - endforeach() -endif() +endforeach() diff --git a/libs/core/executors/tests/regressions/CMakeLists.txt b/libs/core/executors/tests/regressions/CMakeLists.txt index d9676fbfddd3..36c576b51898 100644 --- a/libs/core/executors/tests/regressions/CMakeLists.txt +++ b/libs/core/executors/tests/regressions/CMakeLists.txt @@ -15,10 +15,6 @@ set(tests wrapping_executor ) -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - list(REMOVE_ITEM tests bulk_sync_wait) -endif() - foreach(test ${tests}) set(sources ${test}.cpp) diff --git a/libs/core/executors/tests/unit/CMakeLists.txt b/libs/core/executors/tests/unit/CMakeLists.txt index e11e726808c1..7248e7401a81 100644 --- a/libs/core/executors/tests/unit/CMakeLists.txt +++ b/libs/core/executors/tests/unit/CMakeLists.txt @@ -34,26 +34,24 @@ if(HPX_LIKWID_WITH_LIKWID) set(tests ${tests} likwid_executor) endif() -if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - foreach(test ${tests}) - set(sources ${test}.cpp) +foreach(test ${tests}) + set(sources ${test}.cpp) - set(${test}_PARAMETERS THREADS_PER_LOCALITY 4) + set(${test}_PARAMETERS THREADS_PER_LOCALITY 4) - source_group("Source Files" FILES ${sources}) + source_group("Source Files" FILES ${sources}) - set(folder_name "Tests/Unit/Modules/Core/Executors") + set(folder_name "Tests/Unit/Modules/Core/Executors") - # add example executable - add_hpx_executable( - ${test}_test INTERNAL_FLAGS - SOURCES ${sources} ${${test}_FLAGS} - EXCLUDE_FROM_ALL - HPX_PREFIX ${HPX_BUILD_PREFIX} - FOLDER ${folder_name} - ) + # add example executable + add_hpx_executable( + ${test}_test INTERNAL_FLAGS + SOURCES ${sources} ${${test}_FLAGS} + EXCLUDE_FROM_ALL + HPX_PREFIX ${HPX_BUILD_PREFIX} + FOLDER ${folder_name} + ) - add_hpx_unit_test("modules.executors" ${test} ${${test}_PARAMETERS}) + add_hpx_unit_test("modules.executors" ${test} ${${test}_PARAMETERS}) - endforeach() -endif() +endforeach() diff --git a/libs/core/executors/tests/unit/thread_pool_scheduler.cpp b/libs/core/executors/tests/unit/thread_pool_scheduler.cpp index ed629e421a9d..971b4bc69292 100644 --- a/libs/core/executors/tests/unit/thread_pool_scheduler.cpp +++ b/libs/core/executors/tests/unit/thread_pool_scheduler.cpp @@ -72,8 +72,9 @@ void test_execute() hpx::thread::id parent_id = hpx::this_thread::get_id(); ex::thread_pool_scheduler sched{}; - ex::execute(sched, - [parent_id]() { HPX_TEST_NEQ(hpx::this_thread::get_id(), parent_id); }); + ex::schedule(sched) | ex::then([parent_id]() { + HPX_TEST_NEQ(hpx::this_thread::get_id(), parent_id); + }); } struct check_context_receiver @@ -554,11 +555,13 @@ void test_bulk_starts_on() // Test starts_on pattern: bulk operation with scheduler in environment // Use start_on to provide scheduler through environment - auto bulk_sender = ex::continues_on( - ex::thread_pool_scheduler{}, ex::just() | ex::bulk(n, [&](int i) { - ++v[i]; - HPX_TEST_NEQ(parent_id, hpx::this_thread::get_id()); - })); + auto bulk_sender = ex::continues_on(ex::just() | + ex::bulk(n, + [&](int i) { + ++v[i]; + HPX_TEST_NEQ(parent_id, hpx::this_thread::get_id()); + }), + ex::thread_pool_scheduler{}); tt::sync_wait(std::move(bulk_sender)); diff --git a/libs/core/synchronization/tests/unit/CMakeLists.txt b/libs/core/synchronization/tests/unit/CMakeLists.txt index 73b80a4b8afe..57964bc155c9 100644 --- a/libs/core/synchronization/tests/unit/CMakeLists.txt +++ b/libs/core/synchronization/tests/unit/CMakeLists.txt @@ -58,10 +58,6 @@ set(stop_token_PARAMETERS THREADS_PER_LOCALITY 4) set(in_place_stop_token_cb2_PARAMETERS THREADS_PER_LOCALITY 4) set(in_place_stop_token_PARAMETERS THREADS_PER_LOCALITY 4) -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - list(REMOVE_ITEM tests async_rw_mutex) -endif() - foreach(test ${tests}) set(sources ${test}.cpp) diff --git a/tests/performance/local/CMakeLists.txt b/tests/performance/local/CMakeLists.txt index ca9704a048f0..a920c07421d6 100644 --- a/tests/performance/local/CMakeLists.txt +++ b/tests/performance/local/CMakeLists.txt @@ -35,10 +35,6 @@ if(NOT HPX_WITH_CUDA_COMPUTE) set(stream_FLAGS CUDA) endif() -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") - list(REMOVE_ITEM benchmarks stream_report) -endif() - if(NOT HPX_WITH_SANITIZERS) list(APPEND benchmarks start_stop) endif()