Skip to content

Commit

Permalink
Merge 866373b into 1016250
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg authored Mar 27, 2023
2 parents 1016250 + 866373b commit 2a7986d
Show file tree
Hide file tree
Showing 52 changed files with 60 additions and 46 deletions.
1 change: 1 addition & 0 deletions .inshpect.toml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ patterns = [
{ pattern = '\bstd::any(|_cast)\b', include = 'any' },
{ pattern = '\bstd::error_(code|condition|category)\b', include = 'system_error' },
{ pattern = '\bstd::system_error\b', include = 'system_error' },
{ pattern = '\bstd::chrono\b', include = 'chrono' },
{ pattern = '\bpika::intrusive_ptr\b', include = 'pika/memory/intrusive_ptr.hpp' },
{ pattern = '\bpika::detail::from_string\b', include = 'pika/string_util/from_string.hpp' },
{ pattern = '\bpika::detail::to_string\b', include = 'pika/string_util/to_string.hpp' },
Expand Down
1 change: 1 addition & 0 deletions examples/1d_stencil/1d_stencil_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <pika/chrono.hpp>
#include <pika/init.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions examples/1d_stencil/1d_stencil_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <pika/future.hpp>
#include <pika/init.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions examples/1d_stencil/1d_stencil_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <pika/future.hpp>
#include <pika/init.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion examples/balancing/thread_phase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <pika/barrier.hpp>
#include <pika/functional.hpp>
#include <pika/functional/bind.hpp>
#include <pika/init.hpp>
#include <pika/mutex.hpp>
#include <pika/thread.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/jacobi_smp/jacobi_nonuniform_pika.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
#include "jacobi_nonuniform.hpp"

#include <pika/chrono.hpp>
#include <pika/functional.hpp>
#include <pika/functional/bind.hpp>
#include <pika/future.hpp>

#include <chrono>
#include <cstddef>
#include <functional>
#include <iostream>
Expand Down
3 changes: 2 additions & 1 deletion examples/jacobi_smp/jacobi_omp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

#pragma once

#include <pika/chrono.hpp>
#include <pika/timing/high_resolution_timer.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions examples/jacobi_smp/jacobi_pika.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <pika/chrono.hpp>
#include <pika/future.hpp>

#include <chrono>
#include <cstddef>
#include <functional>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions examples/quickstart/fibonacci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <fmt/ostream.h>
#include <fmt/printf.h>

#include <chrono>
#include <cstdint>
#include <iostream>

Expand Down
4 changes: 2 additions & 2 deletions examples/quickstart/fibonacci_await.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3564.pdf). The
// necessary transformations are performed by hand.

#include <pika/chrono.hpp>
#include <pika/functional.hpp>
#include <pika/functional/bind.hpp>
#include <pika/future.hpp>
#include <pika/init.hpp>

#include <fmt/ostream.h>
#include <fmt/printf.h>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions examples/quickstart/fibonacci_dataflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <fmt/ostream.h>
#include <fmt/printf.h>

#include <chrono>
#include <cstdint>
#include <iostream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions examples/quickstart/fibonacci_futures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <fmt/ostream.h>
#include <fmt/printf.h>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <pika/thread.hpp>

#include <array>
#include <chrono>
#include <string>
#include <thread>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <pika/thread.hpp>

#include <array>
#include <chrono>
#include <string>
#include <thread>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <whip.hpp>

#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <iostream>
Expand Down
3 changes: 2 additions & 1 deletion libs/pika/async_cuda/tests/unit/cublas_matmul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
#include <pika/chrono.hpp>
#include <pika/cuda.hpp>
#include <pika/execution.hpp>
#include <pika/functional.hpp>
#include <pika/functional/bind_front.hpp>
#include <pika/init.hpp>
#include <pika/testing.hpp>

#include <whip.hpp>

#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion libs/pika/async_cuda/tests/unit/cuda_sender.cu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <pika/cuda.hpp>
#include <pika/execution.hpp>
#include <pika/functional.hpp>
#include <pika/functional/bind_front.hpp>
#include <pika/init.hpp>
#include <pika/testing.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <pika/execution_base/execution.hpp>

#include <algorithm>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <type_traits>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <pika/modules/timing.hpp>

#include <algorithm>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <type_traits>
Expand Down
1 change: 0 additions & 1 deletion libs/pika/execution_base/tests/unit/basic_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <pika/execution_base/receiver.hpp>
#include <pika/execution_base/sender.hpp>
#include <pika/modules/functional.hpp>
#include <pika/testing.hpp>

#include <cstddef>
Expand Down
1 change: 0 additions & 1 deletion libs/pika/executors/tests/unit/thread_pool_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <pika/condition_variable.hpp>
#include <pika/execution.hpp>
#include <pika/functional.hpp>
#include <pika/init.hpp>
#include <pika/mutex.hpp>
#include <pika/testing.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// #5488: pika::util::detail::bind doesn't bounds-check placeholders

#include <pika/modules/functional.hpp>
#include <pika/functional/bind.hpp>

#include <type_traits>

Expand Down
2 changes: 1 addition & 1 deletion libs/pika/functional/tests/unit/function_object_size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////

#include <pika/modules/functional.hpp>
#include <pika/functional/function.hpp>
#include <pika/testing.hpp>

#include <cstdint>
Expand Down
1 change: 1 addition & 0 deletions libs/pika/futures/src/future_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <pika/threading_base/annotated_function.hpp>

#include <atomic>
#include <chrono>
#include <cstddef>
#include <exception>
#include <functional>
Expand Down
3 changes: 1 addition & 2 deletions libs/pika/include/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ include
=============

This module provides no functionality in itself. Instead it provides headers
that group together other headers that often appear together. This module
provides local-only headers.
that group together other headers that often appear together.

See the :ref:`API reference <modules_include_api>` of this module for
more details.
Expand Down
1 change: 0 additions & 1 deletion libs/pika/include/include/pika/chrono.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

#pragma once

#include <pika/timing/high_resolution_timer.hpp>
#include <pika/timing/steady_clock.hpp>
16 changes: 0 additions & 16 deletions libs/pika/include/include/pika/functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,5 @@

#pragma once

#include <pika/functional/bind.hpp>
#include <pika/functional/bind_back.hpp>
#include <pika/functional/bind_front.hpp>
#include <pika/functional/function.hpp>
#include <pika/functional/invoke.hpp>
#include <pika/functional/invoke_fused.hpp>
#include <pika/functional/traits/is_bind_expression.hpp>
#include <pika/functional/unique_function.hpp>
#include <pika/threading_base/annotated_function.hpp>
#include <pika/threading_base/scoped_annotation.hpp>

namespace pika {
using pika::detail::is_bind_expression;
using pika::util::detail::function;
using pika::util::detail::invoke;
using pika::util::detail::invoke_fused;
using pika::util::detail::unique_function;
} // namespace pika
2 changes: 0 additions & 2 deletions libs/pika/include/include/pika/stop_token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@

#include <pika/config.hpp>
#include <pika/synchronization/stop_token.hpp>

// C++20 stop_token
13 changes: 8 additions & 5 deletions libs/pika/lcos/tests/unit/dataflow_external_future.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
#include <pika/chrono.hpp>
#include <pika/errors/try_catch_exception_ptr.hpp>
#include <pika/execution.hpp>
#include <pika/functional.hpp>
#include <pika/functional/invoke.hpp>
#include <pika/future.hpp>
#include <pika/init.hpp>
#include <pika/memory/intrusive_ptr.hpp>
#include <pika/program_options.hpp>
#include <pika/testing.hpp>

#include <atomic>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <exception>
Expand All @@ -41,15 +42,15 @@ struct external_future_executor
decltype(auto) async_execute_helper(std::true_type, F&& f, Ts&&... ts)
{
// The completion of f is signalled out-of-band.
pika::invoke(std::forward<F>(f), std::forward<Ts>(ts)...);
pika::util::detail::invoke(std::forward<F>(f), std::forward<Ts>(ts)...);
return pika::async([]() { pika::util::yield_while([]() { return !done; }); });
}

template <typename F, typename... Ts>
decltype(auto) async_execute_helper(std::false_type, F&& f, Ts&&... ts)
{
// The completion of f is signalled out-of-band.
auto&& r = pika::invoke(std::forward<F>(f), std::forward<Ts>(ts)...);
auto&& r = pika::util::detail::invoke(std::forward<F>(f), std::forward<Ts>(ts)...);
return pika::async([r = std::move(r)]() {
pika::util::yield_while([]() { return !done; });
return r;
Expand Down Expand Up @@ -123,15 +124,17 @@ struct external_future_additional_argument_executor
decltype(auto) async_execute_helper(std::true_type, F&& f, Ts&&... ts)
{
// The completion of f is signalled out-of-band.
pika::invoke(std::forward<F>(f), additional_argument{}, std::forward<Ts>(ts)...);
pika::util::detail::invoke(
std::forward<F>(f), additional_argument{}, std::forward<Ts>(ts)...);
return pika::async([]() { pika::util::yield_while([]() { return !done; }); });
}

template <typename F, typename... Ts>
decltype(auto) async_execute_helper(std::false_type, F&& f, Ts&&... ts)
{
// The completion of f is signalled out-of-band.
auto&& r = pika::invoke(std::forward<F>(f), additional_argument{}, std::forward<Ts>(ts)...);
auto&& r = pika::util::detail::invoke(
std::forward<F>(f), additional_argument{}, std::forward<Ts>(ts)...);
return pika::async([r = std::move(r)]() {
pika::util::yield_while([]() { return !done; });
return r;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <pika/debugging/demangle_helper.hpp>
#include <pika/execution.hpp>
#include <pika/functional.hpp>
#include <pika/functional/deferred_call.hpp>
#include <pika/functional/invoke_fused.hpp>
#include <pika/future.hpp>
#include <pika/init.hpp>
#include <pika/modules/resource_partitioner.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// problems such as lockups.

#include <pika/execution.hpp>
#include <pika/functional.hpp>
#include <pika/functional/bind_back.hpp>
#include <pika/future.hpp>
#include <pika/init.hpp>
#include <pika/modules/resource_partitioner.hpp>
Expand All @@ -23,6 +23,7 @@
#include <pika/thread.hpp>

#include <atomic>
#include <chrono>
#include <cstddef>
#include <iostream>
#include <random>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <pika/thread.hpp>

#include <atomic>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <pika/threading_base/annotated_function.hpp>

#include <atomic>
#include <chrono>
#include <cstddef>
#include <iostream>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <pika/synchronization/channel_mpmc.hpp>
#include <pika/thread.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <functional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <pika/synchronization/channel_mpsc.hpp>
#include <pika/thread.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <functional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <pika/synchronization/channel_spsc.hpp>
#include <pika/thread.hpp>

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <functional>
Expand Down
1 change: 1 addition & 0 deletions libs/pika/thread_manager/src/thread_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <pika/assert.hpp>
#include <pika/async_combinators/wait_all.hpp>
#include <pika/execution_base/this_thread.hpp>
#include <pika/functional/bind.hpp>
#include <pika/futures/future.hpp>
#include <pika/modules/errors.hpp>
#include <pika/modules/logging.hpp>
Expand Down
Loading

0 comments on commit 2a7986d

Please sign in to comment.