Skip to content

Commit

Permalink
Cleaning up #includes in hpx/ folder
Browse files Browse the repository at this point in the history
- unifying `<hpx/local/...>` and `<hpx/...>`
  • Loading branch information
hkaiser committed May 7, 2023
1 parent e82d578 commit dbc51cb
Show file tree
Hide file tree
Showing 829 changed files with 2,402 additions and 2,472 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Checks: >
-bugprone-exception-escape,
-bugprone-forward-declaration-namespace,
-bugprone-macro-parentheses,
-bugprone-branch-clone,
modernize-use-nullptr,
misc-assert-side-effect
misc-dangling-handle
Expand Down
7 changes: 7 additions & 0 deletions cmake/templates/HPXConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ set(HPX_CXX_COMPILER_VERSION
# ##############################################################################
# Setup the imported libraries (publicly linked) #

# Propagate Amplifier settings, if needed
if(HPX_WITH_ITTNOTIFY)
set(AMPLIFIER_INCLUDE_DIR "@AMPLIFIER_INCLUDE_DIR@")
set(AMPLIFIER_LIBRARY "@AMPLIFIER_LIBRARY@")
set(AMPLIFIER_ROOT "@AMPLIFIER_ROOT@")
endif()

# Allocator
set(HPX_JEMALLOC_ROOT "@JEMALLOC_ROOT@")
set(HPX_TCMALLOC_ROOT "@TCMALLOC_ROOT@")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ namespace hpx::plugins::parcel {
{
switch (info.type_)
{
// NOLINTNEXTLINE(bugprone-branch-clone)
case performance_counters::counter_type::monotonically_increasing:
{
performance_counters::counter_path_elements paths;
Expand Down Expand Up @@ -176,7 +175,6 @@ namespace hpx::plugins::parcel {
{
switch (info.type_)
{
// NOLINTNEXTLINE(bugprone-branch-clone)
case performance_counters::counter_type::monotonically_increasing:
{
performance_counters::counter_path_elements paths;
Expand Down Expand Up @@ -261,7 +259,6 @@ namespace hpx::plugins::parcel {
{
switch (info.type_)
{
// NOLINTNEXTLINE(bugprone-branch-clone)
case performance_counters::counter_type::average_count:
{
performance_counters::counter_path_elements paths;
Expand Down
4 changes: 2 additions & 2 deletions examples/1d_stencil/1d_stencil_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// This example provides a serial base line implementation. No parallelization
// is performed.

#include <hpx/local/chrono.hpp>
#include <hpx/local/init.hpp>
#include <hpx/chrono.hpp>
#include <hpx/init.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
6 changes: 3 additions & 3 deletions examples/1d_stencil/1d_stencil_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
// overheads.

#include <hpx/assert.hpp>
#include <hpx/local/chrono.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/chrono.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
6 changes: 3 additions & 3 deletions examples/1d_stencil/1d_stencil_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
// example is still fully serial, no parallelization is performed.

#include <hpx/assert.hpp>
#include <hpx/local/chrono.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/chrono.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
8 changes: 4 additions & 4 deletions examples/1d_stencil/1d_stencil_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
// computation. This example is still fully local but demonstrates nice
// scalability on SMP machines.

#include <hpx/algorithm.hpp>
#include <hpx/assert.hpp>
#include <hpx/local/algorithm.hpp>
#include <hpx/local/chrono.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/chrono.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>
#include <hpx/modules/iterator_support.hpp>
#include <hpx/modules/synchronization.hpp>

Expand Down
8 changes: 4 additions & 4 deletions examples/1d_stencil/1d_stencil_4_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// computation. This example is still fully local but demonstrates nice
// scalability on SMP machines.

#include <hpx/local/algorithm.hpp>
#include <hpx/local/chrono.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/algorithm.hpp>
#include <hpx/chrono.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>
#include <hpx/modules/iterator_support.hpp>

#if !defined(HPX_HAVE_CXX17_SHARED_PTR_ARRAY)
Expand Down
10 changes: 5 additions & 5 deletions examples/1d_stencil/1d_stencil_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@

#include <hpx/config.hpp>
#if !defined(HPX_COMPUTE_DEVICE_CODE)
#include "communicator.hpp"
#include "stencil.hpp"

#include <hpx/algorithm.hpp>
#include <hpx/compute.hpp>
#include <hpx/hpx_init.hpp>
#include <hpx/include/async.hpp>
#include <hpx/include/components.hpp>
#include <hpx/include/compute.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/include/util.hpp>
#include <hpx/iterator_support/counting_shape.hpp>
#include <hpx/program_options/options_description.hpp>
#include <hpx/program_options.hpp>

#include <algorithm>
#include <array>
Expand All @@ -32,6 +29,9 @@
#include <string>
#include <vector>

#include "communicator.hpp"
#include "stencil.hpp"

using communication_type = double;

HPX_REGISTER_CHANNEL_DECLARATION(communication_type, stencil_communication)
Expand Down
4 changes: 2 additions & 2 deletions examples/1d_stencil/stencil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

#pragma once

#include <hpx/algorithm.hpp>
#include <hpx/compute.hpp>
#include <hpx/include/async.hpp>
#include <hpx/include/components.hpp>
#include <hpx/include/compute.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/include/parallel_algorithm.hpp>
#include <hpx/include/util.hpp>

#include <algorithm>
Expand Down
10 changes: 5 additions & 5 deletions examples/balancing/hpx_thread_phase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// 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 <hpx/local/barrier.hpp>
#include <hpx/local/functional.hpp>
#include <hpx/local/init.hpp>
#include <hpx/local/mutex.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/barrier.hpp>
#include <hpx/functional.hpp>
#include <hpx/init.hpp>
#include <hpx/modules/concurrency.hpp>
#include <hpx/mutex.hpp>
#include <hpx/thread.hpp>

#include <chrono>
#include <cstddef>
Expand Down
10 changes: 5 additions & 5 deletions examples/balancing/os_thread_num.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// 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 <hpx/local/barrier.hpp>
#include <hpx/local/init.hpp>
#include <hpx/local/runtime.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/barrier.hpp>
#include <hpx/format.hpp>
#include <hpx/init.hpp>
#include <hpx/modules/allocator_support.hpp>
#include <hpx/modules/concurrency.hpp>
#include <hpx/modules/format.hpp>
#include <hpx/runtime.hpp>
#include <hpx/thread.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
8 changes: 4 additions & 4 deletions examples/future_reduce/rnd_future_reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// 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 <hpx/local/chrono.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/local/runtime.hpp>
#include <hpx/chrono.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>
#include <hpx/runtime.hpp>
//
#include <iostream>
#include <random>
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_component/hello_world_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main()
#endif
//]
#else
#include <hpx/local/thread.hpp>
#include <hpx/thread.hpp>
#include <hpx/wrap_main.hpp>

#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion examples/jacobi/jacobi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <hpx/config.hpp>
#if !defined(HPX_COMPUTE_DEVICE_CODE)
#include <hpx/chrono.hpp>
#include <hpx/init.hpp>
#include <hpx/local/chrono.hpp>

#include "jacobi_component/grid.hpp"
#include "jacobi_component/solver.hpp"
Expand Down
4 changes: 2 additions & 2 deletions examples/jacobi_smp/jacobi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#if !defined(JACOBI_SMP_NO_HPX)
#include <hpx/local/init.hpp>
#include <hpx/init.hpp>
#endif

#include <hpx/modules/program_options.hpp>
#include <hpx/program_options.hpp>

#include <cstddef>
#include <iostream>
Expand Down
4 changes: 2 additions & 2 deletions examples/jacobi_smp/jacobi_hpx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// 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 <hpx/local/chrono.hpp>
#include <hpx/local/future.hpp>
#include <hpx/chrono.hpp>
#include <hpx/future.hpp>

#include "jacobi.hpp"

Expand Down
4 changes: 2 additions & 2 deletions examples/jacobi_smp/jacobi_nonuniform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#if !defined(JACOBI_SMP_NO_HPX)
#include <hpx/local/init.hpp>
#include <hpx/init.hpp>
#endif

#include <hpx/modules/program_options.hpp>
#include <hpx/program_options.hpp>

#include <boost/phoenix.hpp>
#include <boost/spirit/include/qi_action.hpp>
Expand Down
6 changes: 3 additions & 3 deletions examples/jacobi_smp/jacobi_nonuniform_hpx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// 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 <hpx/local/chrono.hpp>
#include <hpx/local/functional.hpp>
#include <hpx/local/future.hpp>
#include <hpx/chrono.hpp>
#include <hpx/functional.hpp>
#include <hpx/future.hpp>

#include "jacobi_nonuniform.hpp"

Expand Down
2 changes: 1 addition & 1 deletion examples/jacobi_smp/jacobi_nonuniform_omp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

#include <hpx/local/chrono.hpp>
#include <hpx/chrono.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion examples/jacobi_smp/jacobi_omp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

#include <hpx/local/chrono.hpp>
#include <hpx/chrono.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion examples/qt/qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void qt_main(int argc, char** argv)
app.exec();
}

int hpx_main(int argc, char** argv)
int hpx_main(int argc, char* argv[])
{
{
// Get a reference to one of the main thread
Expand Down
6 changes: 3 additions & 3 deletions examples/quickstart/barrier_docs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
// This example is meant for inclusion in the documentation.

//[barrier_docs
#include <hpx/local/barrier.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/barrier.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>

#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/composable_guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// 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 <hpx/local/init.hpp>
#include <hpx/init.hpp>
#include <hpx/modules/lcos_local.hpp>

#include <atomic>
Expand Down
8 changes: 4 additions & 4 deletions examples/quickstart/condition_variable_docs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// This example is meant for inclusion in the documentation.

//[condition_variable_docs
#include <hpx/local/condition_variable.hpp>
#include <hpx/local/init.hpp>
#include <hpx/local/mutex.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/condition_variable.hpp>
#include <hpx/init.hpp>
#include <hpx/mutex.hpp>
#include <hpx/thread.hpp>

#include <iostream>
#include <string>
Expand Down
6 changes: 3 additions & 3 deletions examples/quickstart/counting_semaphore_docs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
// This example is meant for inclusion in the documentation.

//[counting_semaphore_docs
#include <hpx/local/init.hpp>
#include <hpx/local/semaphore.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/init.hpp>
#include <hpx/semaphore.hpp>
#include <hpx/thread.hpp>

#include <iostream>

Expand Down
6 changes: 3 additions & 3 deletions examples/quickstart/customize_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
// processing unit) for a thread which is created by calling hpx::post() or
// hpx::async().

#include <hpx/local/execution.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/execution.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>

#include <algorithm>
#include <iostream>
Expand Down
6 changes: 3 additions & 3 deletions examples/quickstart/enumerate_threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

//[threads_docs

#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>
#include <hpx/thread.hpp>

#include <functional>
#include <iostream>
Expand Down
4 changes: 2 additions & 2 deletions examples/quickstart/event_synchronization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
////////////////////////////////////////////////////////////////////////////////

#include <hpx/assert.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/init.hpp>
#include <hpx/future.hpp>
#include <hpx/init.hpp>
#include <hpx/modules/synchronization.hpp>

#include <cstddef>
Expand Down
Loading

0 comments on commit dbc51cb

Please sign in to comment.