diff --git a/libs/pika/algorithms/include/pika/algorithms/traits/projected.hpp b/libs/pika/algorithms/include/pika/algorithms/traits/projected.hpp index d3636a545..179219083 100644 --- a/libs/pika/algorithms/include/pika/algorithms/traits/projected.hpp +++ b/libs/pika/algorithms/include/pika/algorithms/traits/projected.hpp @@ -186,12 +186,13 @@ namespace pika { namespace parallel { namespace traits { }; template - struct is_indirect_callable, - typename std::enable_if...>::value && + struct is_indirect_callable, + std::enable_if_t...> && (!pika::is_vectorpack_execution_policy::value || - !pika::util::all_of< - is_projected_zip_iterator...>::value)>::type> + !pika::util::detail::all_of_v< + is_projected_zip_iterator...>)>> : is_indirect_callable_impl::type...> { @@ -202,12 +203,13 @@ namespace pika { namespace parallel { namespace traits { // special handling because zip_iterator<>::reference is not a real // reference type. template - struct is_indirect_callable, - typename std::enable_if...>::value && + struct is_indirect_callable, + std::enable_if_t...> && pika::is_vectorpack_execution_policy::value && - pika::util::all_of< - is_projected_zip_iterator...>::value>::type> + pika::util::detail::all_of_v< + is_projected_zip_iterator...>>> : is_indirect_callable_impl::type...> { @@ -218,7 +220,7 @@ namespace pika { namespace parallel { namespace traits { template struct is_indirect_callable : detail::is_indirect_callable, std::decay_t, - pika::util::pack...>> + pika::util::detail::pack...>> { }; diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/fill.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/fill.hpp index 3b3139e8a..a1c3ec297 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/fill.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/fill.hpp @@ -258,7 +258,7 @@ namespace pika { typename pika::parallel::util::detail::algorithm_result< ExPolicy>::type; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::fill().call( PIKA_FORWARD(ExPolicy, policy), first, last, value); } diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/for_loop.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/for_loop.hpp index 57dd6876d..3e1d19043 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/for_loop.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/for_loop.hpp @@ -767,7 +767,7 @@ namespace pika { /////////////////////////////////////////////////////////////////////// template PIKA_HOST_DEVICE PIKA_FORCEINLINE constexpr void init_iteration( - std::tuple& args, pika::util::index_pack, + std::tuple& args, pika::util::detail::index_pack, std::size_t part_index) noexcept { int const _sequencer[] = { @@ -777,8 +777,8 @@ namespace pika { template PIKA_HOST_DEVICE PIKA_FORCEINLINE constexpr void invoke_iteration( - std::tuple& args, pika::util::index_pack, F&& f, - B part_begin) + std::tuple& args, pika::util::detail::index_pack, + F&& f, B part_begin) { PIKA_INVOKE(PIKA_FORWARD(F, f), part_begin, std::get(args).iteration_value()...); @@ -786,7 +786,8 @@ namespace pika { template PIKA_HOST_DEVICE PIKA_FORCEINLINE constexpr void next_iteration( - std::tuple& args, pika::util::index_pack) noexcept + std::tuple& args, + pika::util::detail::index_pack) noexcept { int const _sequencer[] = { 0, (std::get(args).next_iteration(), 0)...}; @@ -795,7 +796,7 @@ namespace pika { template PIKA_HOST_DEVICE PIKA_FORCEINLINE constexpr void exit_iteration( - std::tuple& args, pika::util::index_pack, + std::tuple& args, pika::util::detail::index_pack, std::size_t size) noexcept { int const _sequencer[] = { @@ -830,8 +831,9 @@ namespace pika { B part_begin, std::size_t part_steps, std::size_t part_index) { - auto pack = typename pika::util::make_index_pack::type(); + auto pack = + typename pika::util::detail::make_index_pack::type(); detail::init_iteration(args_, pack, part_index); if (stride_ == 1) @@ -982,9 +984,10 @@ namespace pika { template - PIKA_HOST_DEVICE static constexpr pika::util::unused_type - sequential(ExPolicy&&, InIter first, std::size_t count, - S stride, F&& f) + PIKA_HOST_DEVICE static constexpr pika::util::detail:: + unused_type + sequential(ExPolicy&&, InIter first, std::size_t count, + S stride, F&& f) { if (stride == 1) { @@ -1022,14 +1025,15 @@ namespace pika { } } - return pika::util::unused_type(); + return pika::util::detail::unused_type(); } template - PIKA_HOST_DEVICE static constexpr pika::util::unused_type - sequential(ExPolicy&&, InIter first, Size size, S stride, F&& f, - Arg&& arg, Args&&... args) + PIKA_HOST_DEVICE static constexpr pika::util::detail:: + unused_type + sequential(ExPolicy&&, InIter first, Size size, S stride, + F&& f, Arg&& arg, Args&&... args) { int const init_sequencer[] = {(arg.init_iteration(0), 0), (args.init_iteration(0), 0)...}; @@ -1080,7 +1084,7 @@ namespace pika { (args.exit_iteration(size), 0)...}; (void) exit_sequencer; - return pika::util::unused_type(); + return pika::util::detail::unused_type(); } template { PIKA_FORWARD(F, f)}, - pika::util::empty_function{}); + pika::util::detail::empty_function{}); } return util::partitioner::call_with_index( PIKA_FORWARD(ExPolicy, policy), first, size, stride, part_iterations{ PIKA_FORWARD(F, f), stride}, - pika::util::empty_function{}); + pika::util::detail::empty_function{}); } else { @@ -1126,9 +1130,8 @@ namespace pika { PIKA_FORWARD(F, f), stride, args}, [=](std::vector>&&) mutable -> void { - auto pack = - typename pika::util::make_index_pack< - sizeof...(Ts)>::type(); + auto pack = typename pika::util::detail:: + make_index_pack::type(); // make sure live-out variables are properly set on // return detail::exit_iteration(args, pack, size); @@ -1142,7 +1145,7 @@ namespace pika { std::size_t... Is, typename... Args> typename util::detail::algorithm_result::type for_loop( ExPolicy&& policy, B first, E last, S stride, - pika::util::index_pack, Args&&... args) + pika::util::detail::index_pack, Args&&... args) { // stride shall not be zero PIKA_ASSERT(stride != 0); @@ -1173,7 +1176,7 @@ namespace pika { std::size_t... Is, typename... Args> typename util::detail::algorithm_result::type for_loop_n( ExPolicy&& policy, B first, Size size, S stride, - pika::util::index_pack, Args&&... args) + pika::util::detail::index_pack, Args&&... args) { // stride shall not be zero PIKA_ASSERT(stride != 0); @@ -1221,7 +1224,7 @@ namespace pika { static_assert(sizeof...(Args) >= 1, "for_loop must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop( PIKA_FORWARD(ExPolicy, policy), first, last, 1, typename make_index_pack::type(), @@ -1241,7 +1244,7 @@ namespace pika { static_assert(sizeof...(Args) >= 1, "for_loop must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop(pika::execution::seq, first, last, 1, typename make_index_pack::type(), PIKA_FORWARD(Args, args)...); @@ -1270,7 +1273,7 @@ namespace pika { "for_loop_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop( PIKA_FORWARD(ExPolicy, policy), first, last, stride, typename make_index_pack::type(), @@ -1292,7 +1295,7 @@ namespace pika { "for_loop_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop(pika::execution::seq, first, last, stride, typename make_index_pack::type(), @@ -1322,7 +1325,7 @@ namespace pika { static_assert(sizeof...(Args) >= 1, "for_loop_n must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop_n( PIKA_FORWARD(ExPolicy, policy), first, size, 1, typename make_index_pack::type(), @@ -1343,7 +1346,7 @@ namespace pika { static_assert(sizeof...(Args) >= 1, "for_loop_n must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop_n(pika::execution::seq, first, size, 1, typename make_index_pack::type(), PIKA_FORWARD(Args, args)...); @@ -1374,7 +1377,7 @@ namespace pika { "for_loop_n_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop_n( PIKA_FORWARD(ExPolicy, policy), first, size, stride, typename make_index_pack::type(), @@ -1397,7 +1400,7 @@ namespace pika { "for_loop_n_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop_n(pika::execution::seq, first, size, stride, typename make_index_pack::type(), diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/nth_element.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/nth_element.hpp index c92c219e5..d9bcc2cd7 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/nth_element.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/nth_element.hpp @@ -392,7 +392,7 @@ namespace pika { using result_type = pika::parallel::util::detail::algorithm_result_t; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::nth_element().call( PIKA_FORWARD(ExPolicy, policy), first, nth, last, PIKA_FORWARD(Pred, pred), diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/sort.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/sort.hpp index b48d07eaa..3da7a0255 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/sort.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/sort.hpp @@ -539,7 +539,7 @@ namespace pika { typename pika::parallel::util::detail::algorithm_result< ExPolicy>::type; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::sort().call( PIKA_FORWARD(ExPolicy, policy), first, last, PIKA_FORWARD(Comp, comp), PIKA_FORWARD(Proj, proj)); diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/stable_sort.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/stable_sort.hpp index cfbe97b27..b98756ff0 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/stable_sort.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/stable_sort.hpp @@ -401,7 +401,7 @@ namespace pika { typename pika::parallel::util::detail::algorithm_result< ExPolicy>::type; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::stable_sort().call( PIKA_FORWARD(ExPolicy, policy), first, last, PIKA_FORWARD(Comp, comp), PIKA_FORWARD(Proj, proj)); diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_default_construct.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_default_construct.hpp index eeee76b1a..96093d0cb 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_default_construct.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_default_construct.hpp @@ -421,7 +421,7 @@ namespace pika { typename pika::parallel::util::detail::algorithm_result< ExPolicy>::type; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::uninitialized_default_construct< FwdIter>() .call(PIKA_FORWARD(ExPolicy, policy), first, last); diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_fill.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_fill.hpp index 9dc2f92b5..d23c9377d 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_fill.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_fill.hpp @@ -424,7 +424,7 @@ namespace pika { typename pika::parallel::util::detail::algorithm_result< ExPolicy>::type; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::uninitialized_fill() .call( PIKA_FORWARD(ExPolicy, policy), first, last, value); diff --git a/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_value_construct.hpp b/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_value_construct.hpp index 60a94ca89..f6689eea9 100644 --- a/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_value_construct.hpp +++ b/libs/pika/algorithms/include/pika/parallel/algorithms/uninitialized_value_construct.hpp @@ -423,7 +423,7 @@ namespace pika { typename pika::parallel::util::detail::algorithm_result< ExPolicy>::type; - return pika::util::void_guard(), + return pika::util::detail::void_guard(), pika::parallel::v1::detail::uninitialized_value_construct< FwdIter>() .call(PIKA_FORWARD(ExPolicy, policy), first, last); diff --git a/libs/pika/algorithms/include/pika/parallel/container_algorithms/for_loop.hpp b/libs/pika/algorithms/include/pika/parallel/container_algorithms/for_loop.hpp index eb5f4f6d1..3ea0fc50d 100644 --- a/libs/pika/algorithms/include/pika/parallel/container_algorithms/for_loop.hpp +++ b/libs/pika/algorithms/include/pika/parallel/container_algorithms/for_loop.hpp @@ -752,7 +752,7 @@ namespace pika { namespace ranges { static_assert(sizeof...(Args) >= 1, "for_loop must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop( PIKA_FORWARD(ExPolicy, policy), first, last, 1, typename make_index_pack::type(), @@ -772,7 +772,7 @@ namespace pika { namespace ranges { static_assert(sizeof...(Args) >= 1, "for_loop must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop(pika::execution::seq, first, last, 1, typename make_index_pack::type(), PIKA_FORWARD(Args, args)...); @@ -792,7 +792,7 @@ namespace pika { namespace ranges { static_assert(sizeof...(Args) >= 1, "for_loop must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop( PIKA_FORWARD(ExPolicy, policy), pika::util::begin(rng), pika::util::end(rng), 1, @@ -812,7 +812,7 @@ namespace pika { namespace ranges { static_assert(sizeof...(Args) >= 1, "for_loop must be called with at least a function object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop(pika::execution::seq, pika::util::begin(rng), pika::util::end(rng), 1, typename make_index_pack::type(), @@ -842,7 +842,7 @@ namespace pika { namespace ranges { "for_loop_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop( PIKA_FORWARD(ExPolicy, policy), first, last, stride, typename make_index_pack::type(), @@ -864,7 +864,7 @@ namespace pika { namespace ranges { "for_loop_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop(pika::execution::seq, first, last, stride, typename make_index_pack::type(), @@ -887,7 +887,7 @@ namespace pika { namespace ranges { "for_loop_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop( PIKA_FORWARD(ExPolicy, policy), pika::util::begin(rng), pika::util::end(rng), stride, @@ -909,7 +909,7 @@ namespace pika { namespace ranges { "for_loop_strided must be called with at least a function " "object"); - using pika::util::make_index_pack; + using pika::util::detail::make_index_pack; return parallel::v2::detail::for_loop(pika::execution::seq, pika::util::begin(rng), pika::util::end(rng), stride, typename make_index_pack::type(), diff --git a/libs/pika/algorithms/include/pika/parallel/datapar/zip_iterator.hpp b/libs/pika/algorithms/include/pika/parallel/datapar/zip_iterator.hpp index 1264143c7..819433c92 100644 --- a/libs/pika/algorithms/include/pika/parallel/datapar/zip_iterator.hpp +++ b/libs/pika/algorithms/include/pika/parallel/datapar/zip_iterator.hpp @@ -36,7 +36,7 @@ namespace pika { namespace parallel { namespace util { namespace detail { template static PIKA_FORCEINLINE bool call( pika::util::zip_iterator const& it, - pika::util::index_pack) + pika::util::detail::index_pack) { auto const& t = it.get_iterator_tuple(); bool const sequencer[] = { @@ -48,15 +48,15 @@ namespace pika { namespace parallel { namespace util { namespace detail { static PIKA_FORCEINLINE bool call( pika::util::zip_iterator const& it) { - return call(it, - typename pika::util::make_index_pack::type()); + return call( + it, pika::util::detail::make_index_pack_t()); } }; /////////////////////////////////////////////////////////////////////////// template struct iterator_datapar_compatible_impl> - : pika::util::all_of::value_type>...> { }; @@ -68,7 +68,7 @@ namespace pika { namespace parallel { namespace traits { namespace detail { template Tuple aligned_pack(pika::util::zip_iterator const& iter, - pika::util::index_pack) + pika::util::detail::index_pack) { auto const& t = iter.get_iterator_tuple(); return std::make_tuple( @@ -79,7 +79,7 @@ namespace pika { namespace parallel { namespace traits { template Tuple unaligned_pack(pika::util::zip_iterator const& iter, - pika::util::index_pack) + pika::util::detail::index_pack) { auto const& t = iter.get_iterator_tuple(); return std::make_tuple( @@ -97,16 +97,16 @@ namespace pika { namespace parallel { namespace traits { template static value_type aligned(pika::util::zip_iterator const& iter) { - return traits::detail::aligned_pack(iter, - typename pika::util::make_index_pack::type()); + return traits::detail::aligned_pack( + iter, pika::util::detail::make_index_pack_t()); } template static value_type unaligned( pika::util::zip_iterator const& iter) { - return traits::detail::unaligned_pack(iter, - typename pika::util::make_index_pack::type()); + return traits::detail::unaligned_pack( + iter, pika::util::detail::make_index_pack()); } }; @@ -115,7 +115,7 @@ namespace pika { namespace parallel { namespace traits { template void aligned_pack(Tuple& value, pika::util::zip_iterator const& iter, - pika::util::index_pack) + pika::util::detail::index_pack) { auto const& t = iter.get_iterator_tuple(); int const sequencer[] = {0, @@ -129,7 +129,7 @@ namespace pika { namespace parallel { namespace traits { template void unaligned_pack(Tuple& value, pika::util::zip_iterator const& iter, - pika::util::index_pack) + pika::util::detail::index_pack) { auto const& t = iter.get_iterator_tuple(); int const sequencer[] = {0, @@ -149,7 +149,7 @@ namespace pika { namespace parallel { namespace traits { V& value, pika::util::zip_iterator const& iter) { traits::detail::aligned_pack(value, iter, - typename pika::util::make_index_pack::type()); + pika::util::detail::make_index_pack_t()); } template @@ -157,7 +157,7 @@ namespace pika { namespace parallel { namespace traits { V& value, pika::util::zip_iterator const& iter) { traits::detail::unaligned_pack(value, iter, - typename pika::util::make_index_pack::type()); + pika::util::detail::make_index_pack()); } }; }}} // namespace pika::parallel::traits diff --git a/libs/pika/algorithms/include/pika/parallel/spmd_block.hpp b/libs/pika/algorithms/include/pika/parallel/spmd_block.hpp index e533a70c5..e2ca3d791 100644 --- a/libs/pika/algorithms/include/pika/parallel/spmd_block.hpp +++ b/libs/pika/algorithms/include/pika/parallel/spmd_block.hpp @@ -125,7 +125,7 @@ namespace pika { namespace lcos { namespace local { template typename std::enable_if< - util::all_of::type...>::value>::type + util::detail::all_of_v::type...>>::type sync_images(I... i) const { std::set images = {(std::size_t) i...}; diff --git a/libs/pika/algorithms/include/pika/parallel/util/detail/algorithm_result.hpp b/libs/pika/algorithms/include/pika/parallel/util/detail/algorithm_result.hpp index 8fcf0be5b..a596f071a 100644 --- a/libs/pika/algorithms/include/pika/parallel/util/detail/algorithm_result.hpp +++ b/libs/pika/algorithms/include/pika/parallel/util/detail/algorithm_result.hpp @@ -52,7 +52,7 @@ namespace pika { namespace parallel { namespace util { namespace detail { // Obtain initiating function's return type. static constexpr void get() noexcept {} - static constexpr void get(pika::util::unused_type) noexcept {} + static constexpr void get(pika::util::detail::unused_type) noexcept {} static void get(pika::future&& t) { @@ -96,7 +96,7 @@ namespace pika { namespace parallel { namespace util { namespace detail { return pika::make_ready_future(); } - static type get(pika::util::unused_type) + static type get(pika::util::detail::unused_type) { return pika::make_ready_future(); } @@ -143,7 +143,7 @@ namespace pika { namespace parallel { namespace util { namespace detail { return pika::make_ready_future(); } - static type get(pika::util::unused_type) + static type get(pika::util::detail::unused_type) { return pika::make_ready_future(); } diff --git a/libs/pika/algorithms/include/pika/parallel/util/partitioner.hpp b/libs/pika/algorithms/include/pika/parallel/util/partitioner.hpp index e12da06eb..afba1555b 100644 --- a/libs/pika/algorithms/include/pika/parallel/util/partitioner.hpp +++ b/libs/pika/algorithms/include/pika/parallel/util/partitioner.hpp @@ -280,7 +280,7 @@ namespace pika { namespace parallel { namespace util { static R reduce(std::vector>&& workitems, std::list&& errors, - pika::util::empty_function) + pika::util::detail::empty_function) { // wait for all tasks to finish pika::wait_all_nothrow(workitems); diff --git a/libs/pika/algorithms/include/pika/parallel/util/prefetching.hpp b/libs/pika/algorithms/include/pika/parallel/util/prefetching.hpp index 9ee0590c9..a2e17f6ca 100644 --- a/libs/pika/algorithms/include/pika/parallel/util/prefetching.hpp +++ b/libs/pika/algorithms/include/pika/parallel/util/prefetching.hpp @@ -262,14 +262,14 @@ namespace pika { namespace parallel { namespace util { template PIKA_FORCEINLINE void prefetch_containers(std::tuple const& t, - pika::util::index_pack, std::size_t idx) + pika::util::detail::index_pack, std::size_t idx) { prefetch_addresses((std::get(t).get())[idx]...); } #else template PIKA_FORCEINLINE void prefetch_containers(std::tuple const& t, - pika::util::index_pack, std::size_t idx) + pika::util::detail::index_pack, std::size_t idx) { int const sequencer[] = {(std::get(t).get()[idx], 0)..., 0}; (void) sequencer; @@ -285,7 +285,8 @@ namespace pika { namespace parallel { namespace util { Pred) { using index_pack_type = - typename pika::util::make_index_pack::type; + typename pika::util::detail::make_index_pack::type; for (/**/; count != 0; (void) --count, ++it) { @@ -318,7 +319,8 @@ namespace pika { namespace parallel { namespace util { CancelToken& tok, F&& f, Pred) { using index_pack_type = - typename pika::util::make_index_pack::type; + typename pika::util::detail::make_index_pack::type; for (/**/; count != 0; (void) --count, ++it) { @@ -368,7 +370,8 @@ namespace pika { namespace parallel { namespace util { Pred) { using index_pack_type = - typename pika::util::make_index_pack::type; + typename pika::util::detail::make_index_pack::type; for (/**/; count != 0; (void) --count, ++it) { @@ -401,7 +404,8 @@ namespace pika { namespace parallel { namespace util { CancelToken& tok, F&& f, Pred) { using index_pack_type = - typename pika::util::make_index_pack::type; + typename pika::util::detail::make_index_pack::type; for (/**/; count != 0; (void) --count, ++it) { @@ -451,7 +455,8 @@ namespace pika { namespace parallel { namespace util { { static_assert(pika::traits::is_random_access_iterator::value, "Iterators have to be of random access iterator category"); - static_assert(pika::util::all_of...>::value, + static_assert( + pika::util::detail::all_of_v...>, "All variadic parameters have to represent ranges"); using ranges_type = std::tuple...>; @@ -469,7 +474,8 @@ namespace pika { namespace parallel { namespace util { using iterator_type = prefetching::prefetching_iterator; using type = typename iterator_type::base_iterator; using index_pack_type = - typename pika::util::make_index_pack::type; + typename pika::util::detail::make_index_pack::type; template static iterator_type call(iterator_type it, End end, F&& f) @@ -529,7 +535,8 @@ namespace pika { namespace parallel { namespace util { using iterator_type = prefetching::prefetching_iterator; using type = typename iterator_type::base_iterator; using index_pack_type = - typename pika::util::make_index_pack::type; + typename pika::util::detail::make_index_pack::type; template static iterator_type call(iterator_type it, End end, F&& f) diff --git a/libs/pika/algorithms/src/task_group.cpp b/libs/pika/algorithms/src/task_group.cpp index 59fc7f5fe..f5c3c2f52 100644 --- a/libs/pika/algorithms/src/task_group.cpp +++ b/libs/pika/algorithms/src/task_group.cpp @@ -76,7 +76,7 @@ namespace pika::execution::experimental { auto state = PIKA_MOVE(state_); if (state) { - state->set_value(pika::util::unused); + state->set_value(pika::util::detail::unused); } } } diff --git a/libs/pika/async_combinators/include/pika/async_combinators/split_future.hpp b/libs/pika/async_combinators/include/pika/async_combinators/split_future.hpp index c8448dc7d..b6cd0186d 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/split_future.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/split_future.hpp @@ -176,7 +176,8 @@ namespace pika { /////////////////////////////////////////////////////////////////////// template PIKA_FORCEINLINE std::tuple...> split_future_helper( - pika::future>&& f, pika::util::index_pack) + pika::future>&& f, + pika::util::detail::index_pack) { return std::make_tuple(extract_nth_future(f)...); } @@ -184,7 +185,7 @@ namespace pika { template PIKA_FORCEINLINE std::tuple...> split_future_helper( pika::shared_future>&& f, - pika::util::index_pack) + pika::util::detail::index_pack) { return std::make_tuple(extract_nth_future(f)...); } @@ -302,7 +303,8 @@ namespace pika { pika::future>&& f) { return detail::split_future_helper(PIKA_MOVE(f), - typename pika::util::make_index_pack::type()); + typename pika::util::detail::make_index_pack::type()); } PIKA_FORCEINLINE std::tuple> split_future( @@ -316,7 +318,8 @@ namespace pika { pika::shared_future>&& f) { return detail::split_future_helper(PIKA_MOVE(f), - typename pika::util::make_index_pack::type()); + typename pika::util::detail::make_index_pack::type()); } PIKA_FORCEINLINE std::tuple> split_future( diff --git a/libs/pika/async_combinators/include/pika/async_combinators/wait_all.hpp b/libs/pika/async_combinators/include/pika/async_combinators/wait_all.hpp index faa268dc9..5906837e6 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/wait_all.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/wait_all.hpp @@ -134,7 +134,7 @@ namespace pika { #include #include #include -#include +#include #include #include @@ -304,9 +304,10 @@ namespace pika { template PIKA_FORCEINLINE void await_range() { - await_range( - pika::util::begin(pika::util::unwrap_ref(std::get(t_))), - pika::util::end(pika::util::unwrap_ref(std::get(t_)))); + await_range(pika::util::begin(pika::detail::unwrap_reference( + std::get(t_))), + pika::util::end( + pika::detail::unwrap_reference(std::get(t_)))); } // Current element is a simple future @@ -346,11 +347,11 @@ namespace pika { if constexpr (is_end_v) { // simply make ourself ready - this->set_value(util::unused); + this->set_value(util::detail::unused); } else { - using future_type = pika::util::decay_unwrap_t< + using future_type = pika::util::detail::decay_unwrap_t< typename std::tuple_element::type>; if constexpr (is_future_or_shared_state_v) diff --git a/libs/pika/async_combinators/include/pika/async_combinators/wait_each.hpp b/libs/pika/async_combinators/include/pika/async_combinators/wait_each.hpp index a4c97d3a6..1df35a760 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/wait_each.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/wait_each.hpp @@ -209,7 +209,7 @@ namespace pika { template > && - util::all_of_v...>>> + util::detail::all_of_v...>>> void wait_each_nothrow(F&& f, Ts&&... ts) { pika::when_each(PIKA_FORWARD(F, f), PIKA_FORWARD(Ts, ts)...).wait(); @@ -218,7 +218,7 @@ namespace pika { template > && - util::all_of_v...>>> + util::detail::all_of_v...>>> void wait_each(F&& f, Ts&&... ts) { auto result = diff --git a/libs/pika/async_combinators/include/pika/async_combinators/wait_some.hpp b/libs/pika/async_combinators/include/pika/async_combinators/wait_some.hpp index 202dd7d3e..f0b1c9ce9 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/wait_some.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/wait_some.hpp @@ -221,7 +221,7 @@ namespace pika { template PIKA_FORCEINLINE void apply( - Tuple const& tuple, pika::util::index_pack) const + Tuple const& tuple, pika::util::detail::index_pack) const { int const _sequencer[] = { 0, (((*this)(std::get(tuple))), 0)...}; @@ -231,7 +231,8 @@ namespace pika { template PIKA_FORCEINLINE void apply(std::tuple const& sequence) const { - apply(sequence, pika::util::make_index_pack_t()); + apply(sequence, + pika::util::detail::make_index_pack_t()); } template diff --git a/libs/pika/async_combinators/include/pika/async_combinators/when_any.hpp b/libs/pika/async_combinators/include/pika/async_combinators/when_any.hpp index 32c92382f..30e3a54f8 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/when_any.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/when_any.hpp @@ -276,7 +276,7 @@ namespace pika { template PIKA_FORCEINLINE void apply( - Tuple& tuple, pika::util::index_pack) const + Tuple& tuple, pika::util::detail::index_pack) const { int const _sequencer[] = { (((*this)(std::get(tuple))), 0)...}; @@ -286,7 +286,8 @@ namespace pika { template PIKA_FORCEINLINE void apply(std::tuple& sequence) const { - apply(sequence, pika::util::make_index_pack_t()); + apply(sequence, + pika::util::detail::make_index_pack_t()); } template diff --git a/libs/pika/async_combinators/include/pika/async_combinators/when_each.hpp b/libs/pika/async_combinators/include/pika/async_combinators/when_each.hpp index 0507fcd34..14bde35f3 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/when_each.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/when_each.hpp @@ -137,7 +137,7 @@ namespace pika { #include #include #include -#include +#include #include #include @@ -189,11 +189,11 @@ namespace pika { { if constexpr (is_end_v) { - this->set_value(util::unused); + this->set_value(util::detail::unused); } else { - using future_type = pika::util::decay_unwrap_t< + using future_type = pika::util::detail::decay_unwrap_t< typename std::tuple_element::type>; if constexpr (pika::traits::is_future_v || @@ -209,7 +209,8 @@ namespace pika { future_type>, "element must be future or range of futures"); - auto&& curr = pika::util::unwrap_ref(std::get(t_)); + auto&& curr = + pika::detail::unwrap_reference(std::get(t_)); await_range( pika::util::begin(curr), pika::util::end(curr)); } @@ -269,7 +270,7 @@ namespace pika { if (++count_ == needed_count_) { - this->set_value(util::unused); + this->set_value(util::detail::unused); // explicitly destruct iterators as those might // become dangling after we make ourselves ready @@ -286,7 +287,7 @@ namespace pika { template PIKA_FORCEINLINE void await_future() { - using future_type = pika::util::decay_unwrap_t< + using future_type = pika::util::detail::decay_unwrap_t< typename std::tuple_element::type>; pika::intrusive_ptr this_(this); @@ -325,7 +326,7 @@ namespace pika { if (++count_ == needed_count_) { - this->set_value(util::unused); + this->set_value(util::detail::unused); return; } @@ -429,7 +430,7 @@ namespace pika { /////////////////////////////////////////////////////////////////////////// template std::enable_if_t> && - pika::util::all_of_v...>, + pika::util::detail::all_of_v...>, pika::future> when_each(F&& f, Ts&&... ts) { diff --git a/libs/pika/async_combinators/include/pika/async_combinators/when_some.hpp b/libs/pika/async_combinators/include/pika/async_combinators/when_some.hpp index 36970860b..c9fd3204b 100644 --- a/libs/pika/async_combinators/include/pika/async_combinators/when_some.hpp +++ b/libs/pika/async_combinators/include/pika/async_combinators/when_some.hpp @@ -301,7 +301,7 @@ namespace pika { template PIKA_FORCEINLINE void apply( - Tuple& tuple, util::index_pack) const + Tuple& tuple, util::detail::index_pack) const { int const _sequencer[] = { (((*this)(std::get(tuple))), 0)...}; @@ -311,7 +311,8 @@ namespace pika { template PIKA_FORCEINLINE void apply(std::tuple& sequence) const { - apply(sequence, util::make_index_pack_t()); + apply( + sequence, util::detail::make_index_pack_t()); } template diff --git a/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp b/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp index d98b8a95d..01c2e9e1c 100644 --- a/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp +++ b/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp @@ -499,18 +499,18 @@ namespace pika::cuda::experimental::then_with_stream_detail { pika::execution::experimental::value_types_of_t< then_with_cuda_stream_sender_type, pika::execution::experimental::detail::empty_env, - pika::util::pack, pika::util::pack>, + pika::util::detail::pack, pika::util::detail::pack>, result_types_helper>, pika::detail::monostate>>>; #else - using result_type = - pika::util::detail::change_pack_t, - result_types_helper>, - pika::detail::monostate>>>; + using result_type = pika::util::detail::change_pack_t< + pika::detail::variant, + pika::util::detail::unique_t, + result_types_helper>, + pika::detail::monostate>>>; #endif result_type result; diff --git a/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp b/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp index f47247eb3..774f61179 100644 --- a/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp +++ b/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp @@ -323,7 +323,8 @@ namespace pika::mpi::experimental { transform_mpi_sender_type, pika::execution::experimental::detail:: empty_env, - pika::util::pack, pika::util::pack>, + pika::util::detail::pack, + pika::util::detail::pack>, result_types_helper>, pika::detail::monostate>>>; #else @@ -332,7 +333,8 @@ namespace pika::mpi::experimental { pika::util::detail::unique_t, + pika::util::detail::pack, + pika::util::detail::pack>, result_types_helper>, pika::detail::monostate>>>; #endif diff --git a/libs/pika/datastructures/include/pika/datastructures/member_pack.hpp b/libs/pika/datastructures/include/pika/datastructures/member_pack.hpp index 0fa184798..205eca4fd 100644 --- a/libs/pika/datastructures/include/pika/datastructures/member_pack.hpp +++ b/libs/pika/datastructures/include/pika/datastructures/member_pack.hpp @@ -102,7 +102,7 @@ namespace pika::util::detail { struct PIKA_EMPTY_BASES member_pack; template - struct PIKA_EMPTY_BASES member_pack, Ts...> + struct PIKA_EMPTY_BASES member_pack, Ts...> : member_leaf... { member_pack() = default; @@ -140,6 +140,6 @@ namespace pika::util::detail { template using member_pack_for = - member_pack::type, Ts...>; + member_pack, Ts...>; } // namespace pika::util::detail diff --git a/libs/pika/execution/include/pika/execution/algorithms/detail/partial_algorithm.hpp b/libs/pika/execution/include/pika/execution/algorithms/detail/partial_algorithm.hpp index 409f34d72..1385a6058 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/detail/partial_algorithm.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/detail/partial_algorithm.hpp @@ -20,7 +20,8 @@ namespace pika { struct partial_algorithm_base; template - struct partial_algorithm_base, Ts...> + struct partial_algorithm_base, + Ts...> { private: pika::util::detail::member_pack_for ts; @@ -49,5 +50,6 @@ namespace pika { template using partial_algorithm = partial_algorithm_base::type, Ts...>; + typename pika::util::detail::make_index_pack::type, + Ts...>; }}}} // namespace pika::execution::experimental::detail diff --git a/libs/pika/execution/include/pika/execution/algorithms/detail/predicates.hpp b/libs/pika/execution/include/pika/execution/algorithms/detail/predicates.hpp index 73cd3ac15..cea23c209 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/detail/predicates.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/detail/predicates.hpp @@ -274,8 +274,8 @@ namespace pika { namespace parallel { inline namespace v1 { namespace detail { struct equal_to { template ::value>::type> + typename Enable = std::enable_if_t< + pika::traits::detail::is_equality_comparable_with_v>> PIKA_HOST_DEVICE PIKA_FORCEINLINE constexpr auto operator()( T1&& t1, T2&& t2) const { @@ -286,8 +286,8 @@ namespace pika { namespace parallel { inline namespace v1 { namespace detail { struct not_equal_to { template ::value>::type> + typename Enable = std::enable_if_t< + pika::traits::detail::is_equality_comparable_with_v>> PIKA_HOST_DEVICE PIKA_FORCEINLINE constexpr auto operator()( T1&& t1, T2&& t2) const { diff --git a/libs/pika/execution/include/pika/execution/algorithms/detail/single_result.hpp b/libs/pika/execution/include/pika/execution/algorithms/detail/single_result.hpp index b63169d1d..2a72f1eeb 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/detail/single_result.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/detail/single_result.hpp @@ -25,19 +25,20 @@ namespace pika { }; template <> - struct single_result>> + struct single_result>> { using type = void; }; template - struct single_result>> + struct single_result>> { using type = T; }; template - struct single_result>> + struct single_result< + pika::util::detail::pack>> { static_assert(sizeof(T) == 0, "expected a single variant with a single type in " @@ -46,7 +47,7 @@ namespace pika { }; template - struct single_result> + struct single_result> { static_assert(sizeof(T) == 0, "expected a single variant with a single type in " @@ -76,7 +77,7 @@ namespace pika { }; template - struct single_variant> + struct single_variant> { using type = T; }; diff --git a/libs/pika/execution/include/pika/execution/algorithms/just.hpp b/libs/pika/execution/include/pika/execution/algorithms/just.hpp index b3a8f5a1d..3b135bead 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/just.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/just.hpp @@ -28,7 +28,7 @@ namespace pika { namespace execution { namespace experimental { struct just_sender_impl; template - struct just_sender_impl, Ts...> + struct just_sender_impl, Ts...> { struct just_sender_type { @@ -131,7 +131,8 @@ namespace pika { namespace execution { namespace experimental { constexpr PIKA_FORCEINLINE auto operator()(Ts&&... ts) const { return just_detail::just_sender< - typename pika::util::make_index_pack::type, + typename pika::util::detail::make_index_pack::type, Ts...>{PIKA_FORWARD(Ts, ts)...}; } } just{}; diff --git a/libs/pika/execution/include/pika/execution/algorithms/let_error.hpp b/libs/pika/execution/include/pika/execution/algorithms/let_error.hpp index dc407d02a..412f1c580 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/let_error.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/let_error.hpp @@ -64,8 +64,8 @@ namespace pika { namespace execution { namespace experimental { PredecessorSender>::template error_types, std::decay>; static_assert( - !std::is_same, - pika::util::pack<>>::value, + !std::is_same, + pika::util::detail::pack<>>::value, "let_error used with a predecessor that has an empty " "error_types. Is let_error misplaced?"); diff --git a/libs/pika/execution/include/pika/execution/algorithms/let_value.hpp b/libs/pika/execution/include/pika/execution/algorithms/let_value.hpp index 9963978f1..f977601f9 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/let_value.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/let_value.hpp @@ -97,7 +97,7 @@ namespace pika { namespace execution { namespace experimental { >>>; #endif - // pika::util::pack acts as a concrete type in place of Tuple. It is + // pika::util::detail::pack acts as a concrete type in place of Tuple. It is // required for computing successor_sender_types, but disappears // from the final error_types. template