diff --git a/.clang-format b/.clang-format index 6b15453a9..486f659b2 100644 --- a/.clang-format +++ b/.clang-format @@ -145,6 +145,15 @@ IncludeCategories: - Regex: '^"mt-kahypar/utils' Priority: 18 SortPriority: 6 + - Regex: '^' + Priority: 3 + SortPriority: 2 + - Regex: '^"gtest' # C++ headers. + Priority: 1 + SortPriority: 0 + - Regex: '^"gmock' # C++ headers. + Priority: 1 + SortPriority: 0 - Regex: '^<' # C++ headers. Priority: 2 SortPriority: 1 diff --git a/include/helper_functions.h b/include/helper_functions.h index 19cdade2b..ac8312d99 100644 --- a/include/helper_functions.h +++ b/include/helper_functions.h @@ -26,13 +26,13 @@ #pragma once -#include #include - -#include "libmtkahypartypes.h" +#include #include "mt-kahypar/partition/context.h" +#include "libmtkahypartypes.h" + using namespace mt_kahypar; namespace lib { diff --git a/lib/examples/construct_graph.cc b/lib/examples/construct_graph.cc index 8a23fd699..cf3a45afa 100644 --- a/lib/examples/construct_graph.cc +++ b/lib/examples/construct_graph.cc @@ -1,6 +1,5 @@ -#include -#include #include +#include #include #include diff --git a/lib/examples/construct_hypergraph.cc b/lib/examples/construct_hypergraph.cc index 1f3df5545..f9aa3de39 100644 --- a/lib/examples/construct_hypergraph.cc +++ b/lib/examples/construct_hypergraph.cc @@ -1,6 +1,5 @@ -#include -#include #include +#include #include #include diff --git a/lib/examples/improve_partition.cc b/lib/examples/improve_partition.cc index 488446fa2..aca97195a 100644 --- a/lib/examples/improve_partition.cc +++ b/lib/examples/improve_partition.cc @@ -1,5 +1,3 @@ -#include -#include #include #include diff --git a/lib/examples/map_hypergraph_onto_target_graph.cc b/lib/examples/map_hypergraph_onto_target_graph.cc index b8b18dbbe..66c4b6ff1 100644 --- a/lib/examples/map_hypergraph_onto_target_graph.cc +++ b/lib/examples/map_hypergraph_onto_target_graph.cc @@ -1,7 +1,7 @@ -#include -#include #include +#include #include +#include #include diff --git a/lib/examples/partition_graph.cc b/lib/examples/partition_graph.cc index c3be14f37..fb02f1c1a 100644 --- a/lib/examples/partition_graph.cc +++ b/lib/examples/partition_graph.cc @@ -1,6 +1,5 @@ -#include -#include #include +#include #include #include diff --git a/lib/examples/partition_hypergraph.cc b/lib/examples/partition_hypergraph.cc index b9889c3f8..7ee88e2e7 100644 --- a/lib/examples/partition_hypergraph.cc +++ b/lib/examples/partition_hypergraph.cc @@ -1,6 +1,5 @@ -#include -#include #include +#include #include #include diff --git a/lib/examples/partition_with_fixed_vertices.cc b/lib/examples/partition_with_fixed_vertices.cc index dd52e9f03..c8bb58018 100644 --- a/lib/examples/partition_with_fixed_vertices.cc +++ b/lib/examples/partition_with_fixed_vertices.cc @@ -1,6 +1,5 @@ -#include -#include #include +#include #include #include diff --git a/lib/examples/partition_with_individual_block_weights.cc b/lib/examples/partition_with_individual_block_weights.cc index e1230096d..c181fbc9a 100644 --- a/lib/examples/partition_with_individual_block_weights.cc +++ b/lib/examples/partition_with_individual_block_weights.cc @@ -1,6 +1,5 @@ -#include -#include #include +#include #include #include diff --git a/lib/libmtkahypar.cpp b/lib/libmtkahypar.cpp index b91ab2d57..36c4a73fd 100644 --- a/lib/libmtkahypar.cpp +++ b/lib/libmtkahypar.cpp @@ -26,24 +26,24 @@ ******************************************************************************/ #include "include/libmtkahypar.h" -#include "include/libmtkahypartypes.h" -#include "include/helper_functions.h" #include "tbb/parallel_for.h" +#include "include/helper_functions.h" +#include "include/libmtkahypartypes.h" + #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/partitioner_facade.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/conversion.h" -#include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/parallel/tbb_initializer.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/conversion.h" +#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/partition/partitioner_facade.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" +#include "mt-kahypar/utils/randomize.h" #ifndef MT_KAHYPAR_DISABLE_BOOST #include "mt-kahypar/io/command_line_options.h" diff --git a/mt-kahypar/application/mt_kahypar.cc.in b/mt-kahypar/application/mt_kahypar.cc.in index 5cdd7bad2..bb9e509cc 100644 --- a/mt-kahypar/application/mt_kahypar.cc.in +++ b/mt-kahypar/application/mt_kahypar.cc.in @@ -31,15 +31,14 @@ #include "mt-kahypar/io/command_line_options.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/partition/partitioner_facade.h" -#include "mt-kahypar/partition/registries/register_memory_pool.h" #include "mt-kahypar/partition/conversion.h" #include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/partition/partitioner_facade.h" +#include "mt-kahypar/partition/registries/register_memory_pool.h" #include "mt-kahypar/utils/delete.h" +#include "mt-kahypar/utils/exception.h" #include "mt-kahypar/utils/randomize.h" #include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/utils/exception.h" using namespace mt_kahypar; diff --git a/mt-kahypar/datastructures/array.h b/mt-kahypar/datastructures/array.h index 92a9c1da9..dcbfad8b0 100644 --- a/mt-kahypar/datastructures/array.h +++ b/mt-kahypar/datastructures/array.h @@ -27,13 +27,12 @@ #pragma once -#include -#include #include +#include +#include "tbb//parallel_invoke.h" #include "tbb/parallel_for.h" #include "tbb/scalable_allocator.h" -#include "tbb//parallel_invoke.h" #include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/memory_pool.h" diff --git a/mt-kahypar/datastructures/bitset.h b/mt-kahypar/datastructures/bitset.h index 7a27762e3..464f249f6 100644 --- a/mt-kahypar/datastructures/bitset.h +++ b/mt-kahypar/datastructures/bitset.h @@ -26,11 +26,11 @@ #pragma once -#include #include #include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "mt-kahypar/utils/bit_ops.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/buffered_vector.h b/mt-kahypar/datastructures/buffered_vector.h index 86030a68b..587f6b01e 100644 --- a/mt-kahypar/datastructures/buffered_vector.h +++ b/mt-kahypar/datastructures/buffered_vector.h @@ -28,8 +28,9 @@ #pragma once #include -#include -#include + +#include "tbb/enumerable_thread_specific.h" +#include "tbb/scalable_allocator.h" namespace mt_kahypar::ds { diff --git a/mt-kahypar/datastructures/concurrent_bucket_map.h b/mt-kahypar/datastructures/concurrent_bucket_map.h index 1cd2b41d7..a83faf544 100644 --- a/mt-kahypar/datastructures/concurrent_bucket_map.h +++ b/mt-kahypar/datastructures/concurrent_bucket_map.h @@ -28,17 +28,15 @@ #pragma once #include -#include #include +#include #include "tbb/task_arena.h" #include "tbb/task_group.h" -#include "kahypar-resources/meta/mandatory.h" - #include "mt-kahypar/macros.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/concurrent_flat_map.h b/mt-kahypar/datastructures/concurrent_flat_map.h index 8cedd89fa..4ffdf340d 100644 --- a/mt-kahypar/datastructures/concurrent_flat_map.h +++ b/mt-kahypar/datastructures/concurrent_flat_map.h @@ -28,12 +28,10 @@ #pragma once #include +#include #include #include -#include -#include -#include "kahypar-resources/macros.h" #include "kahypar-resources/meta/mandatory.h" #include "mt-kahypar/macros.h" diff --git a/mt-kahypar/datastructures/connectivity_info.h b/mt-kahypar/datastructures/connectivity_info.h index 622e94f7c..b3fa79332 100644 --- a/mt-kahypar/datastructures/connectivity_info.h +++ b/mt-kahypar/datastructures/connectivity_info.h @@ -28,8 +28,8 @@ #include "tbb/parallel_invoke.h" -#include "mt-kahypar/datastructures/pin_count_in_part.h" #include "mt-kahypar/datastructures/connectivity_set.h" +#include "mt-kahypar/datastructures/pin_count_in_part.h" #include "mt-kahypar/datastructures/sparse_pin_counts.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/connectivity_set.h b/mt-kahypar/datastructures/connectivity_set.h index 3f24e5b5d..d39488151 100644 --- a/mt-kahypar/datastructures/connectivity_set.h +++ b/mt-kahypar/datastructures/connectivity_set.h @@ -27,24 +27,18 @@ #pragma once -#include -#include -#include #include #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/static_bitset.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/utils/bit_ops.h" #include "mt-kahypar/utils/memory_tree.h" #include "mt-kahypar/utils/range.h" -#include "mt-kahypar/macros.h" -#include "hypergraph_common.h" - namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/contraction_tree.cpp b/mt-kahypar/datastructures/contraction_tree.cpp index 9873276f0..1041459f8 100644 --- a/mt-kahypar/datastructures/contraction_tree.cpp +++ b/mt-kahypar/datastructures/contraction_tree.cpp @@ -28,14 +28,12 @@ #include "mt-kahypar/datastructures/contraction_tree.h" #include - -#include -#include #include +#include +#include -#include "mt-kahypar/parallel/parallel_prefix_sum.h" #include "mt-kahypar/datastructures/streaming_vector.h" -#include "mt-kahypar/utils/timer.h" +#include "mt-kahypar/parallel/parallel_prefix_sum.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/contraction_tree.h b/mt-kahypar/datastructures/contraction_tree.h index 61f124395..e204addd4 100644 --- a/mt-kahypar/datastructures/contraction_tree.h +++ b/mt-kahypar/datastructures/contraction_tree.h @@ -27,13 +27,12 @@ #pragma once -#include +#include "tbb/parallel_for.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/parallel/atomic_wrapper.h" -#include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/utils/memory_tree.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/delta_connectivity_set.h b/mt-kahypar/datastructures/delta_connectivity_set.h index 27f2077c9..7c8377069 100644 --- a/mt-kahypar/datastructures/delta_connectivity_set.h +++ b/mt-kahypar/datastructures/delta_connectivity_set.h @@ -27,21 +27,13 @@ #pragma once -#include -#include -#include -#include - #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/datastructures/static_bitset.h" -#include "mt-kahypar/datastructures/connectivity_set.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/utils/range.h" +#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/utils/range.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/delta_partitioned_graph.h b/mt-kahypar/datastructures/delta_partitioned_graph.h index 43e11c484..b78876e09 100644 --- a/mt-kahypar/datastructures/delta_partitioned_graph.h +++ b/mt-kahypar/datastructures/delta_partitioned_graph.h @@ -28,18 +28,13 @@ #pragma once -#include -#include - #include "kahypar-resources/meta/mandatory.h" +#include "mt-kahypar/datastructures/connectivity_set.h" +#include "mt-kahypar/datastructures/delta_connectivity_set.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/datastructures/delta_connectivity_set.h" -#include "mt-kahypar/datastructures/connectivity_set.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/utils/exception.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/delta_partitioned_hypergraph.h b/mt-kahypar/datastructures/delta_partitioned_hypergraph.h index 9eb52ab3d..d6e046f8d 100644 --- a/mt-kahypar/datastructures/delta_partitioned_hypergraph.h +++ b/mt-kahypar/datastructures/delta_partitioned_hypergraph.h @@ -27,14 +27,11 @@ #pragma once -#include -#include - #include "kahypar-resources/meta/mandatory.h" +#include "mt-kahypar/datastructures/delta_connectivity_set.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/datastructures/delta_connectivity_set.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/context.h" diff --git a/mt-kahypar/datastructures/dynamic_adjacency_array.cpp b/mt-kahypar/datastructures/dynamic_adjacency_array.cpp index 5a517c730..1eae33a56 100644 --- a/mt-kahypar/datastructures/dynamic_adjacency_array.cpp +++ b/mt-kahypar/datastructures/dynamic_adjacency_array.cpp @@ -29,6 +29,7 @@ #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/parallel_prefix_sum.h" +#include "mt-kahypar/datastructures/streaming_vector.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/dynamic_adjacency_array.h b/mt-kahypar/datastructures/dynamic_adjacency_array.h index 61ea71b6f..a72abb25f 100644 --- a/mt-kahypar/datastructures/dynamic_adjacency_array.h +++ b/mt-kahypar/datastructures/dynamic_adjacency_array.h @@ -33,13 +33,11 @@ #include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/datastructures/streaming_vector.h" #include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/parallel/stl/scalable_unique_ptr.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/dynamic_graph.cpp b/mt-kahypar/datastructures/dynamic_graph.cpp index 13f2901c2..22075c37a 100644 --- a/mt-kahypar/datastructures/dynamic_graph.cpp +++ b/mt-kahypar/datastructures/dynamic_graph.cpp @@ -29,15 +29,10 @@ #include "mt-kahypar/datastructures/dynamic_graph.h" #include "tbb/blocked_range.h" +#include "tbb/concurrent_queue.h" +#include "tbb/parallel_reduce.h" #include "tbb/parallel_scan.h" #include "tbb/parallel_sort.h" -#include "tbb/parallel_reduce.h" -#include "tbb/concurrent_queue.h" - -#include "mt-kahypar/parallel/stl/scalable_queue.h" -#include "mt-kahypar/datastructures/concurrent_bucket_map.h" -#include "mt-kahypar/datastructures/streaming_vector.h" -#include "mt-kahypar/utils/timer.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/dynamic_graph.h b/mt-kahypar/datastructures/dynamic_graph.h index 90e867471..646fb90e5 100644 --- a/mt-kahypar/datastructures/dynamic_graph.h +++ b/mt-kahypar/datastructures/dynamic_graph.h @@ -28,25 +28,16 @@ #pragma once -#include -#include - #include "tbb/parallel_for.h" #include "include/libmtkahypartypes.h" -#include "kahypar-resources/meta/mandatory.h" -#include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include "kahypar-resources/utils/math.h" - -#include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/datastructures/fixed_vertex_support.h" -#include "mt-kahypar/datastructures/dynamic_adjacency_array.h" #include "mt-kahypar/datastructures/contraction_tree.h" -#include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" +#include "mt-kahypar/datastructures/dynamic_adjacency_array.h" +#include "mt-kahypar/datastructures/fixed_vertex_support.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/utils/memory_tree.h" -#include "mt-kahypar/utils/exception.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/dynamic_graph_factory.cpp b/mt-kahypar/datastructures/dynamic_graph_factory.cpp index 3708fb7d0..2b75564e0 100644 --- a/mt-kahypar/datastructures/dynamic_graph_factory.cpp +++ b/mt-kahypar/datastructures/dynamic_graph_factory.cpp @@ -33,7 +33,6 @@ #include "mt-kahypar/parallel/parallel_prefix_sum.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar::ds { diff --git a/mt-kahypar/datastructures/dynamic_hypergraph.cpp b/mt-kahypar/datastructures/dynamic_hypergraph.cpp index 99afceec6..55dc53423 100644 --- a/mt-kahypar/datastructures/dynamic_hypergraph.cpp +++ b/mt-kahypar/datastructures/dynamic_hypergraph.cpp @@ -28,15 +28,15 @@ #include "mt-kahypar/datastructures/dynamic_hypergraph.h" #include "tbb/blocked_range.h" +#include "tbb/concurrent_queue.h" +#include "tbb/parallel_reduce.h" #include "tbb/parallel_scan.h" #include "tbb/parallel_sort.h" -#include "tbb/parallel_reduce.h" -#include "tbb/concurrent_queue.h" -#include "mt-kahypar/parallel/stl/scalable_queue.h" +#include "kahypar-resources/utils/math.h" + #include "mt-kahypar/datastructures/concurrent_bucket_map.h" #include "mt-kahypar/datastructures/streaming_vector.h" -#include "mt-kahypar/utils/timer.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/dynamic_hypergraph.h b/mt-kahypar/datastructures/dynamic_hypergraph.h index c36ac98a4..6043edbb0 100644 --- a/mt-kahypar/datastructures/dynamic_hypergraph.h +++ b/mt-kahypar/datastructures/dynamic_hypergraph.h @@ -27,25 +27,20 @@ #pragma once -#include -#include - #include "tbb/parallel_for.h" #include "include/libmtkahypartypes.h" -#include "kahypar-resources/meta/mandatory.h" #include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include "kahypar-resources/utils/math.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/datastructures/contraction_tree.h" #include "mt-kahypar/datastructures/fixed_vertex_support.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/incident_net_array.h" -#include "mt-kahypar/datastructures/contraction_tree.h" #include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/utils/memory_tree.h" #include "mt-kahypar/utils/exception.h" +#include "mt-kahypar/utils/memory_tree.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/dynamic_hypergraph_factory.cpp b/mt-kahypar/datastructures/dynamic_hypergraph_factory.cpp index 6e31fdea1..9b33d87a8 100644 --- a/mt-kahypar/datastructures/dynamic_hypergraph_factory.cpp +++ b/mt-kahypar/datastructures/dynamic_hypergraph_factory.cpp @@ -34,7 +34,6 @@ #include "kahypar-resources/utils/math.h" #include "mt-kahypar/parallel/parallel_prefix_sum.h" -#include "mt-kahypar/utils/timer.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/dynamic_hypergraph_factory.h b/mt-kahypar/datastructures/dynamic_hypergraph_factory.h index 5e23f9e70..f388e3ec1 100644 --- a/mt-kahypar/datastructures/dynamic_hypergraph_factory.h +++ b/mt-kahypar/datastructures/dynamic_hypergraph_factory.h @@ -29,7 +29,6 @@ #include "tbb/enumerable_thread_specific.h" - #include "mt-kahypar/datastructures/dynamic_hypergraph.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/parallel/atomic_wrapper.h" diff --git a/mt-kahypar/datastructures/fixed_vertex_support.cpp b/mt-kahypar/datastructures/fixed_vertex_support.cpp index 36482b667..bc7d05d8f 100644 --- a/mt-kahypar/datastructures/fixed_vertex_support.cpp +++ b/mt-kahypar/datastructures/fixed_vertex_support.cpp @@ -26,8 +26,6 @@ #include "mt-kahypar/datastructures/fixed_vertex_support.h" -#include "mt-kahypar/macros.h" - namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/fixed_vertex_support.h b/mt-kahypar/datastructures/fixed_vertex_support.h index 938683a39..97623f1f5 100644 --- a/mt-kahypar/datastructures/fixed_vertex_support.h +++ b/mt-kahypar/datastructures/fixed_vertex_support.h @@ -29,8 +29,8 @@ #include #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/graph.cpp b/mt-kahypar/datastructures/graph.cpp index 5b609e67c..0878110b9 100644 --- a/mt-kahypar/datastructures/graph.cpp +++ b/mt-kahypar/datastructures/graph.cpp @@ -27,17 +27,15 @@ #include "graph.h" - +#include #include -#include #include -#include +#include #include "mt-kahypar/definitions.h" -#include "mt-kahypar/parallel/parallel_prefix_sum.h" #include "mt-kahypar/parallel/atomic_wrapper.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/parallel/parallel_counting_sort.h" +#include "mt-kahypar/parallel/parallel_prefix_sum.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar::ds { diff --git a/mt-kahypar/datastructures/graph.h b/mt-kahypar/datastructures/graph.h index 3a9c07557..31d7561f1 100644 --- a/mt-kahypar/datastructures/graph.h +++ b/mt-kahypar/datastructures/graph.h @@ -27,8 +27,6 @@ #pragma once -#include -#include #include #include "mt-kahypar/datastructures/array.h" @@ -36,7 +34,6 @@ #include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/range.h" - namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/hypergraph_common.h b/mt-kahypar/datastructures/hypergraph_common.h index ee7720433..1cbedfbef 100644 --- a/mt-kahypar/datastructures/hypergraph_common.h +++ b/mt-kahypar/datastructures/hypergraph_common.h @@ -32,11 +32,11 @@ #include "include/libmtkahypartypes.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/hardware_topology.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/parallel/tbb_initializer.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" -#include "mt-kahypar/datastructures/array.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/incident_net_array.h b/mt-kahypar/datastructures/incident_net_array.h index efefa3294..1ef9fb2b4 100644 --- a/mt-kahypar/datastructures/incident_net_array.h +++ b/mt-kahypar/datastructures/incident_net_array.h @@ -35,13 +35,12 @@ #include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/parallel/stl/scalable_unique_ptr.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/atomic_wrapper.h" -#include "mt-kahypar/parallel/parallel_prefix_sum.h" +#include "mt-kahypar/parallel/stl/scalable_unique_ptr.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/partitioned_graph.h b/mt-kahypar/datastructures/partitioned_graph.h index 1bc3acd9d..9b48663f0 100644 --- a/mt-kahypar/datastructures/partitioned_graph.h +++ b/mt-kahypar/datastructures/partitioned_graph.h @@ -30,20 +30,17 @@ #include #include -#include #include "tbb/parallel_invoke.h" #include "kahypar-resources/meta/mandatory.h" #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/datastructures/connectivity_set.h" +#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/parallel/stl/thread_locals.h" #include "mt-kahypar/utils/range.h" -#include "mt-kahypar/utils/timer.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/partitioned_hypergraph.h b/mt-kahypar/datastructures/partitioned_hypergraph.h index b8826a080..73e068911 100644 --- a/mt-kahypar/datastructures/partitioned_hypergraph.h +++ b/mt-kahypar/datastructures/partitioned_hypergraph.h @@ -28,22 +28,19 @@ #pragma once #include -#include -#include #include "tbb/parallel_invoke.h" #include "kahypar-resources/meta/mandatory.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/connectivity_info.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/streaming_vector.h" #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/parallel/stl/thread_locals.h" -#include "mt-kahypar/utils/range.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/utils/exception.h" +#include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/pin_count_in_part.h b/mt-kahypar/datastructures/pin_count_in_part.h index b901391d5..dd1a79f9d 100644 --- a/mt-kahypar/datastructures/pin_count_in_part.h +++ b/mt-kahypar/datastructures/pin_count_in_part.h @@ -32,10 +32,10 @@ #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/pin_count_snapshot.h" +#include "mt-kahypar/macros.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/pin_count_snapshot.h b/mt-kahypar/datastructures/pin_count_snapshot.h index ce16c19f0..1aa6b2bc9 100644 --- a/mt-kahypar/datastructures/pin_count_snapshot.h +++ b/mt-kahypar/datastructures/pin_count_snapshot.h @@ -30,11 +30,8 @@ #include - -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/datastructures/array.h" - +#include "mt-kahypar/macros.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/priority_queue.h b/mt-kahypar/datastructures/priority_queue.h index 6d22d179b..4c34a498d 100644 --- a/mt-kahypar/datastructures/priority_queue.h +++ b/mt-kahypar/datastructures/priority_queue.h @@ -26,13 +26,12 @@ ******************************************************************************/ #pragma once -#include -#include -#include #include #include +#include +#include -#include +#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/sparse_map.h b/mt-kahypar/datastructures/sparse_map.h index 6131f9e12..4ab213bdb 100644 --- a/mt-kahypar/datastructures/sparse_map.h +++ b/mt-kahypar/datastructures/sparse_map.h @@ -34,17 +34,14 @@ #pragma once #include -#include -#include -#include #include +#include #include "kahypar-resources/macros.h" #include "kahypar-resources/meta/mandatory.h" #include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/memory_pool.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/parallel/stl/scalable_unique_ptr.h" namespace mt_kahypar { diff --git a/mt-kahypar/datastructures/sparse_pin_counts.h b/mt-kahypar/datastructures/sparse_pin_counts.h index 5eb69774d..b62801e6b 100644 --- a/mt-kahypar/datastructures/sparse_pin_counts.h +++ b/mt-kahypar/datastructures/sparse_pin_counts.h @@ -28,17 +28,15 @@ #pragma once #include -#include #include +#include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/pin_count_snapshot.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" - namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/static_bitset.h b/mt-kahypar/datastructures/static_bitset.h index 7db3c36d5..19ccfe01f 100644 --- a/mt-kahypar/datastructures/static_bitset.h +++ b/mt-kahypar/datastructures/static_bitset.h @@ -29,10 +29,12 @@ #include #include +#include "kahypar-resources/macros.h" + +#include "mt-kahypar/datastructures/bitset.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/macros.h" #include "mt-kahypar/utils/bit_ops.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/datastructures/bitset.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/static_graph.cpp b/mt-kahypar/datastructures/static_graph.cpp index 4a2b4db87..c5bd7d1a7 100644 --- a/mt-kahypar/datastructures/static_graph.cpp +++ b/mt-kahypar/datastructures/static_graph.cpp @@ -28,17 +28,16 @@ #include "static_graph.h" +#include + +#include "tbb/parallel_reduce.h" +#include "tbb/parallel_sort.h" + +#include "mt-kahypar/datastructures/concurrent_bucket_map.h" #include "mt-kahypar/parallel/chunking.h" #include "mt-kahypar/parallel/parallel_prefix_sum.h" -#include "mt-kahypar/datastructures/concurrent_bucket_map.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/utils/memory_tree.h" -#include - -#include -#include - namespace mt_kahypar::ds { /*! diff --git a/mt-kahypar/datastructures/static_graph.h b/mt-kahypar/datastructures/static_graph.h index 0d49ee9ff..87a09fbb9 100644 --- a/mt-kahypar/datastructures/static_graph.h +++ b/mt-kahypar/datastructures/static_graph.h @@ -34,16 +34,14 @@ #include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/fixed_vertex_support.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/memory_tree.h" #include "mt-kahypar/utils/range.h" -#include "mt-kahypar/utils/exception.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/static_graph_factory.cpp b/mt-kahypar/datastructures/static_graph_factory.cpp index 47f62618d..3c6b1a26e 100644 --- a/mt-kahypar/datastructures/static_graph_factory.cpp +++ b/mt-kahypar/datastructures/static_graph_factory.cpp @@ -33,8 +33,6 @@ #include "mt-kahypar/parallel/parallel_prefix_sum.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/utils/timer.h" -#include "mt-kahypar/utils/exception.h" namespace mt_kahypar::ds { void StaticGraphFactory::sort_incident_edges(StaticGraph& graph) { diff --git a/mt-kahypar/datastructures/static_graph_factory.h b/mt-kahypar/datastructures/static_graph_factory.h index 1ecc2a4bd..d6b1a496b 100644 --- a/mt-kahypar/datastructures/static_graph_factory.h +++ b/mt-kahypar/datastructures/static_graph_factory.h @@ -34,7 +34,6 @@ #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/utils/exception.h" - namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/static_hypergraph.cpp b/mt-kahypar/datastructures/static_hypergraph.cpp index e230c85fd..fe6b7b1d9 100644 --- a/mt-kahypar/datastructures/static_hypergraph.cpp +++ b/mt-kahypar/datastructures/static_hypergraph.cpp @@ -27,13 +27,13 @@ #include "static_hypergraph.h" -#include "mt-kahypar/parallel/parallel_prefix_sum.h" -#include "mt-kahypar/datastructures/concurrent_bucket_map.h" -#include "mt-kahypar/utils/timer.h" -#include "mt-kahypar/utils/memory_tree.h" - #include #include +#include "tbb/enumerable_thread_specific.h" + +#include "mt-kahypar/datastructures/concurrent_bucket_map.h" +#include "mt-kahypar/parallel/parallel_prefix_sum.h" +#include "mt-kahypar/utils/memory_tree.h" namespace mt_kahypar::ds { diff --git a/mt-kahypar/datastructures/static_hypergraph.h b/mt-kahypar/datastructures/static_hypergraph.h index c0184ec8c..c808e2eaf 100644 --- a/mt-kahypar/datastructures/static_hypergraph.h +++ b/mt-kahypar/datastructures/static_hypergraph.h @@ -27,21 +27,19 @@ #pragma once - #include "tbb/parallel_for.h" #include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/fixed_vertex_support.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/partition/context_enum_classes.h" +#include "mt-kahypar/utils/exception.h" #include "mt-kahypar/utils/memory_tree.h" #include "mt-kahypar/utils/range.h" -#include "mt-kahypar/utils/exception.h" namespace mt_kahypar { namespace ds { diff --git a/mt-kahypar/datastructures/static_hypergraph_factory.cpp b/mt-kahypar/datastructures/static_hypergraph_factory.cpp index eb40e7d5d..c8dee0c85 100644 --- a/mt-kahypar/datastructures/static_hypergraph_factory.cpp +++ b/mt-kahypar/datastructures/static_hypergraph_factory.cpp @@ -27,11 +27,10 @@ #include "static_hypergraph_factory.h" -#include -#include +#include "tbb/parallel_for.h" +#include "tbb/parallel_invoke.h" #include "mt-kahypar/parallel/parallel_prefix_sum.h" -#include "mt-kahypar/utils/timer.h" namespace mt_kahypar::ds { diff --git a/mt-kahypar/datastructures/static_hypergraph_factory.h b/mt-kahypar/datastructures/static_hypergraph_factory.h index d583035f6..80aeece4c 100644 --- a/mt-kahypar/datastructures/static_hypergraph_factory.h +++ b/mt-kahypar/datastructures/static_hypergraph_factory.h @@ -33,7 +33,6 @@ #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/utils/exception.h" - namespace mt_kahypar::ds { class StaticHypergraphFactory { diff --git a/mt-kahypar/datastructures/streaming_vector.h b/mt-kahypar/datastructures/streaming_vector.h index d2137670a..3dc78a340 100644 --- a/mt-kahypar/datastructures/streaming_vector.h +++ b/mt-kahypar/datastructures/streaming_vector.h @@ -34,8 +34,6 @@ #include "tbb/task_arena.h" #include "tbb/task_group.h" -#include "kahypar-resources/meta/mandatory.h" - #include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" diff --git a/mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h b/mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h index 8a0fe25fe..01aa92bfe 100644 --- a/mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h +++ b/mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h @@ -31,10 +31,6 @@ #include #include #include -#include - -#include "mt-kahypar/macros.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" // based on http://upcoder.com/9/fast-resettable-flag-vector/ diff --git a/mt-kahypar/definitions.h b/mt-kahypar/definitions.h index 9f0fc7e20..bd27db327 100644 --- a/mt-kahypar/definitions.h +++ b/mt-kahypar/definitions.h @@ -26,24 +26,24 @@ #pragma once +#include "include/libmtkahypartypes.h" + #include "kahypar-resources/meta/policy_registry.h" #include "kahypar-resources/meta/typelist.h" -#include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" - +#include "mt-kahypar/datastructures/delta_partitioned_graph.h" +#include "mt-kahypar/datastructures/delta_partitioned_hypergraph.h" #include "mt-kahypar/datastructures/dynamic_graph.h" #include "mt-kahypar/datastructures/dynamic_graph_factory.h" -#include "mt-kahypar/datastructures/static_graph.h" -#include "mt-kahypar/datastructures/static_graph_factory.h" -#include "mt-kahypar/datastructures/partitioned_graph.h" -#include "mt-kahypar/datastructures/delta_partitioned_graph.h" #include "mt-kahypar/datastructures/dynamic_hypergraph.h" #include "mt-kahypar/datastructures/dynamic_hypergraph_factory.h" +#include "mt-kahypar/datastructures/partitioned_graph.h" +#include "mt-kahypar/datastructures/partitioned_hypergraph.h" +#include "mt-kahypar/datastructures/static_graph.h" +#include "mt-kahypar/datastructures/static_graph_factory.h" #include "mt-kahypar/datastructures/static_hypergraph.h" #include "mt-kahypar/datastructures/static_hypergraph_factory.h" -#include "mt-kahypar/datastructures/partitioned_hypergraph.h" -#include "mt-kahypar/datastructures/delta_partitioned_hypergraph.h" +#include "mt-kahypar/macros.h" namespace mt_kahypar { diff --git a/mt-kahypar/io/command_line_options.cpp b/mt-kahypar/io/command_line_options.cpp index f177d1644..723febf02 100644 --- a/mt-kahypar/io/command_line_options.cpp +++ b/mt-kahypar/io/command_line_options.cpp @@ -25,12 +25,12 @@ * SOFTWARE. ******************************************************************************/ -#include "command_line_options.h" +#include "mt-kahypar/io/command_line_options.h" #include #ifdef _WIN32 -#include #include +#include #else #include #endif diff --git a/mt-kahypar/io/command_line_options.h b/mt-kahypar/io/command_line_options.h index 867732029..cdc47313f 100644 --- a/mt-kahypar/io/command_line_options.h +++ b/mt-kahypar/io/command_line_options.h @@ -28,6 +28,7 @@ #pragma once #include + #include "mt-kahypar/partition/context.h" namespace mt_kahypar { diff --git a/mt-kahypar/io/csv_output.cpp b/mt-kahypar/io/csv_output.cpp index 6014d42c6..bc41bc5fa 100644 --- a/mt-kahypar/io/csv_output.cpp +++ b/mt-kahypar/io/csv_output.cpp @@ -31,8 +31,6 @@ #include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/utils/initial_partitioning_stats.h" -#include "mt-kahypar/utils/stats.h" #include "mt-kahypar/utils/timer.h" namespace mt_kahypar::io::csv { diff --git a/mt-kahypar/io/hypergraph_factory.cpp b/mt-kahypar/io/hypergraph_factory.cpp index b96b38e3f..547fb958d 100644 --- a/mt-kahypar/io/hypergraph_factory.cpp +++ b/mt-kahypar/io/hypergraph_factory.cpp @@ -26,11 +26,12 @@ #include "hypergraph_factory.h" -#include "mt-kahypar/macros.h" +#include "mt-kahypar/datastructures/fixed_vertex_support.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_io.h" -#include "mt-kahypar/datastructures/fixed_vertex_support.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/partition/conversion.h" +#include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar { @@ -194,8 +195,8 @@ void addFixedVertices(Hypergraph& hypergraph, if ( fixed_vertices[hn] != -1 ) { if ( fixed_vertices[hn] < 0 || fixed_vertices[hn] >= k ) { throw InvalidInputException( - "Try to partition hypergraph into " + STR(k) + " blocks, but node " + - STR(hn) + " is fixed to block " + STR(fixed_vertices[hn])); + "Try to partition hypergraph into " + std::to_string(k) + " blocks, but node " + + std::to_string(hn) + " is fixed to block " + std::to_string(fixed_vertices[hn])); } fixed_vertex_support.fixToBlock(hn, fixed_vertices[hn]); } diff --git a/mt-kahypar/io/hypergraph_factory.h b/mt-kahypar/io/hypergraph_factory.h index 3535d3224..bc1958b2b 100644 --- a/mt-kahypar/io/hypergraph_factory.h +++ b/mt-kahypar/io/hypergraph_factory.h @@ -32,7 +32,6 @@ #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/utils/cast.h" namespace mt_kahypar { namespace io { diff --git a/mt-kahypar/io/hypergraph_io.cpp b/mt-kahypar/io/hypergraph_io.cpp index 1c7705b4b..8c5a38486 100644 --- a/mt-kahypar/io/hypergraph_io.cpp +++ b/mt-kahypar/io/hypergraph_io.cpp @@ -28,29 +28,26 @@ #include "hypergraph_io.h" #include +#include #include #include +#include #include -#include #include -#include -#include #if defined(__linux__) or defined(__APPLE__) #include #include #elif _WIN32 -#include -#include #include +#include +#include #endif - #include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar::io { diff --git a/mt-kahypar/io/partitioning_output.cpp b/mt-kahypar/io/partitioning_output.cpp index 13f1f0160..83c057b89 100644 --- a/mt-kahypar/io/partitioning_output.cpp +++ b/mt-kahypar/io/partitioning_output.cpp @@ -30,22 +30,22 @@ #include #include "tbb/blocked_range.h" +#include "tbb/enumerable_thread_specific.h" #include "tbb/parallel_invoke.h" -#include "tbb/parallel_sort.h" #include "tbb/parallel_reduce.h" -#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_sort.h" + +#include "kahypar-resources/utils/math.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/parallel/memory_pool.h" #include "mt-kahypar/parallel/atomic_wrapper.h" -#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/parallel/memory_pool.h" #include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/utils/hypergraph_statistics.h" #include "mt-kahypar/utils/memory_tree.h" #include "mt-kahypar/utils/timer.h" -#include "kahypar-resources/utils/math.h" - namespace mt_kahypar::io { namespace internal { @@ -651,6 +651,7 @@ namespace mt_kahypar::io { } void printBanner() { + // clang-format off LOG << R"(+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++)"; LOG << R"(+ __ __ _______ _ __ _ _ _____ +)"; LOG << R"(+ | \/ |__ __| | |/ / | | | | | __ \ +)"; @@ -662,6 +663,7 @@ namespace mt_kahypar::io { LOG << R"(+ |___/ +)"; LOG << R"(+ Karlsruhe Shared Memory Hypergraph Partitioning Framework +)"; LOG << R"(+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++)"; + // clang-format on } namespace internal { diff --git a/mt-kahypar/io/sql_plottools_serializer.cpp b/mt-kahypar/io/sql_plottools_serializer.cpp index 07d4f6e04..bb120752b 100644 --- a/mt-kahypar/io/sql_plottools_serializer.cpp +++ b/mt-kahypar/io/sql_plottools_serializer.cpp @@ -30,10 +30,10 @@ #include #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/utils/utilities.h" +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/utils/timer.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar::io::serializer { diff --git a/mt-kahypar/io/sql_plottools_serializer.h b/mt-kahypar/io/sql_plottools_serializer.h index 5845e2da2..2a43f169f 100644 --- a/mt-kahypar/io/sql_plottools_serializer.h +++ b/mt-kahypar/io/sql_plottools_serializer.h @@ -27,8 +27,8 @@ #pragma once -#include #include +#include #include "mt-kahypar/partition/context.h" diff --git a/mt-kahypar/macros.h b/mt-kahypar/macros.h index 0249d5a16..870ae75b7 100644 --- a/mt-kahypar/macros.h +++ b/mt-kahypar/macros.h @@ -26,8 +26,6 @@ #pragma once -#include - #if defined(MT_KAHYPAR_LIBRARY_MODE) || \ !defined(KAHYPAR_ENABLE_THREAD_PINNING) || defined(__APPLE__) #include "tbb/task_arena.h" @@ -63,73 +61,8 @@ #define MT_KAHYPAR_ATTRIBUTE_ALWAYS_INLINE #endif -#define HEAVY_ASSERT0(cond) \ - !(enable_heavy_assert) ? (void)0 : [&]() { ASSERT(cond); }() -#define HEAVY_ASSERT1(cond, msg) \ - !(enable_heavy_assert) ? (void)0 : [&]() { ASSERT(cond, msg); }() - -#ifdef KAHYPAR_ENABLE_HEAVY_PREPROCESSING_ASSERTIONS -#define HEAVY_PREPROCESSING_ASSERT_1(cond) ASSERT(cond) -#define HEAVY_PREPROCESSING_ASSERT_2(cond, msg) ASSERT(cond, msg) -#else -#define HEAVY_PREPROCESSING_ASSERT_1(cond) HEAVY_ASSERT0(cond) -#define HEAVY_PREPROCESSING_ASSERT_2(cond, msg) HEAVY_ASSERT1(cond, msg) -#endif - -#ifdef KAHYPAR_ENABLE_HEAVY_COARSENING_ASSERTIONS -#define HEAVY_COARSENING_ASSERT_1(cond) ASSERT(cond) -#define HEAVY_COARSENING_ASSERT_2(cond, msg) ASSERT(cond, msg) -#else -#define HEAVY_COARSENING_ASSERT_1(cond) HEAVY_ASSERT0(cond) -#define HEAVY_COARSENING_ASSERT_2(cond, msg) HEAVY_ASSERT1(cond, msg) -#endif - -#ifdef KAHYPAR_ENABLE_HEAVY_INITIAL_PARTITIONING_ASSERTIONS -#define HEAVY_INITIAL_PARTITIONING_ASSERT_1(cond) ASSERT(cond) -#define HEAVY_INITIAL_PARTITIONING_ASSERT_2(cond, msg) ASSERT(cond, msg) -#else -#define HEAVY_INITIAL_PARTITIONING_ASSERT_1(cond) HEAVY_ASSERT0(cond) -#define HEAVY_INITIAL_PARTITIONING_ASSERT_2(cond, msg) HEAVY_ASSERT1(cond, msg) -#endif - -#ifdef KAHYPAR_ENABLE_HEAVY_REFINEMENT_ASSERTIONS -#define HEAVY_REFINEMENT_ASSERT_1(cond) ASSERT(cond) -#define HEAVY_REFINEMENT_ASSERT_2(cond, msg) ASSERT(cond, msg) -#else -#define HEAVY_REFINEMENT_ASSERT_1(cond) HEAVY_ASSERT0(cond) -#define HEAVY_REFINEMENT_ASSERT_2(cond, msg) HEAVY_ASSERT1(cond, msg) -#endif - -#define HEAVY_ASSERT_(TYPE, N) HEAVY_##TYPE##_ASSERT_##N -#define HEAVY_ASSERT_EVAL(TYPE, N) HEAVY_ASSERT_(TYPE, N) - -// Heavy assertions are assertions which increase the complexity of the scope -// which they are executed in by an polynomial factor. In debug mode you are -// often only interested in certain phase of the multilevel paradigm. However, -// when enabling all assertions it can take a while to reach the point which you -// are really interested in, because heavy assertions radicaly downgrade the -// performance of the application. Therefore such assertions should be packed in -// a heavy assertion macro. Heavy assertions can be enabled via cmake flag for -// specific phase or for specific scope by adding static constexpr bool -// enable_heavy_assert = false; to the corresponding scope. -#define HEAVY_PREPROCESSING_ASSERT(...) \ - EXPAND(HEAVY_ASSERT_EVAL(PREPROCESSING, \ - EXPAND(NARG(__VA_ARGS__)))(__VA_ARGS__)) -#define HEAVY_COARSENING_ASSERT(...) \ - EXPAND(HEAVY_ASSERT_EVAL(COARSENING, EXPAND(NARG(__VA_ARGS__)))(__VA_ARGS__)) -#define HEAVY_INITIAL_PARTITIONING_ASSERT(...) \ - EXPAND(HEAVY_ASSERT_EVAL(INITIAL_PARTITIONING, \ - EXPAND(NARG(__VA_ARGS__)))(__VA_ARGS__)) -#define HEAVY_REFINEMENT_ASSERT(...) \ - EXPAND(HEAVY_ASSERT_EVAL(REFINEMENT, EXPAND(NARG(__VA_ARGS__)))(__VA_ARGS__)) - // In windows unisgned long != size_t #define UL(X) (size_t) X -#ifdef STR -#undef STR -#endif -#define STR(X) std::to_string(X) -#define STREAM2STR(X) static_cast(X).str(); // Info, Warning and Error Output Macros #define GREEN "\033[1;92m" diff --git a/mt-kahypar/parallel/chunking.h b/mt-kahypar/parallel/chunking.h index 20e75d128..dcd918876 100644 --- a/mt-kahypar/parallel/chunking.h +++ b/mt-kahypar/parallel/chunking.h @@ -27,8 +27,8 @@ #pragma once -#include #include +#include namespace mt_kahypar::parallel::chunking { template diff --git a/mt-kahypar/parallel/hardware_topology.h b/mt-kahypar/parallel/hardware_topology.h index 7e14a968d..9dd6901cb 100644 --- a/mt-kahypar/parallel/hardware_topology.h +++ b/mt-kahypar/parallel/hardware_topology.h @@ -27,14 +27,12 @@ #pragma once +#include #include #include +#include #include #include -#include -#include - -#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/hwloc_topology.h" #include "mt-kahypar/utils/exception.h" diff --git a/mt-kahypar/parallel/memory_pool.h b/mt-kahypar/parallel/memory_pool.h index 798d0b118..1c7bb7099 100644 --- a/mt-kahypar/parallel/memory_pool.h +++ b/mt-kahypar/parallel/memory_pool.h @@ -27,13 +27,12 @@ #pragma once +#include +#include #include #include -#include #include -#include #include -#include #if defined(__linux__) or defined(__APPLE__) #include #elif _WIN32 @@ -43,8 +42,8 @@ #include "tbb/parallel_for.h" #include "tbb/scalable_allocator.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/parallel/stl/scalable_unique_ptr.h" +#include "kahypar-resources/macros.h" + #include "mt-kahypar/utils/memory_tree.h" namespace mt_kahypar { diff --git a/mt-kahypar/parallel/parallel_counting_sort.h b/mt-kahypar/parallel/parallel_counting_sort.h index 573dff6c3..d0cf608a4 100644 --- a/mt-kahypar/parallel/parallel_counting_sort.h +++ b/mt-kahypar/parallel/parallel_counting_sort.h @@ -27,12 +27,11 @@ #pragma once +#include #include #include -#include #include #include -#include #include "mt-kahypar/parallel/chunking.h" #include "mt-kahypar/parallel/parallel_prefix_sum.h" diff --git a/mt-kahypar/parallel/parallel_prefix_sum.h b/mt-kahypar/parallel/parallel_prefix_sum.h index f1f59dc90..b4ef8e948 100644 --- a/mt-kahypar/parallel/parallel_prefix_sum.h +++ b/mt-kahypar/parallel/parallel_prefix_sum.h @@ -27,10 +27,7 @@ #pragma once -#include -#include - -#include +#include "tbb/parallel_scan.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" diff --git a/mt-kahypar/parallel/stl/thread_locals.h b/mt-kahypar/parallel/stl/thread_locals.h index 5518196f4..c279df2d9 100644 --- a/mt-kahypar/parallel/stl/thread_locals.h +++ b/mt-kahypar/parallel/stl/thread_locals.h @@ -27,8 +27,8 @@ #pragma once -#include -#include +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" namespace mt_kahypar { diff --git a/mt-kahypar/parallel/tbb_initializer.h b/mt-kahypar/parallel/tbb_initializer.h index d0e50d484..d0763ba7f 100644 --- a/mt-kahypar/parallel/tbb_initializer.h +++ b/mt-kahypar/parallel/tbb_initializer.h @@ -28,16 +28,12 @@ #pragma once #include -#include #include -#include -#include +#include "tbb/global_control.h" #include "tbb/task_arena.h" #include "tbb/task_group.h" -#include "tbb/global_control.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/thread_pinning_observer.h" namespace mt_kahypar { diff --git a/mt-kahypar/parallel/thread_pinning_observer.h b/mt-kahypar/parallel/thread_pinning_observer.h index ce30572b1..3b936b938 100644 --- a/mt-kahypar/parallel/thread_pinning_observer.h +++ b/mt-kahypar/parallel/thread_pinning_observer.h @@ -27,10 +27,10 @@ #pragma once -#include -#include #include #include +#include +#include #ifdef __linux__ #include @@ -44,7 +44,6 @@ #undef __TBB_ARENA_OBSERVER #include "mt-kahypar/macros.h" -#include "mt-kahypar/utils/randomize.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar { diff --git a/mt-kahypar/parallel/work_stack.h b/mt-kahypar/parallel/work_stack.h index 7c5ea04d8..2f273d03c 100644 --- a/mt-kahypar/parallel/work_stack.h +++ b/mt-kahypar/parallel/work_stack.h @@ -32,6 +32,7 @@ #include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/utils/memory_tree.h" +#include "mt-kahypar/utils/randomize.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.cpp b/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.cpp index a627db6ca..f8c1bda67 100644 --- a/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.cpp +++ b/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.cpp @@ -26,7 +26,7 @@ #include "deterministic_multilevel_coarsener.h" -#include +#include "tbb/parallel_sort.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h b/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h index 3796ba940..b7fd0c497 100644 --- a/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h +++ b/mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h @@ -26,19 +26,17 @@ #pragma once -#include "multilevel_coarsener_base.h" -#include "i_coarsener.h" +#include "tbb/enumerable_thread_specific.h" #include "include/libmtkahypartypes.h" -#include "mt-kahypar/utils/reproducible_random.h" -#include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/datastructures/buffered_vector.h" -#include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/utils/progress_bar.h" +#include "mt-kahypar/datastructures/sparse_map.h" +#include "mt-kahypar/partition/coarsening/i_coarsener.h" +#include "mt-kahypar/partition/coarsening/multilevel_coarsener_base.h" #include "mt-kahypar/utils/cast.h" - -#include +#include "mt-kahypar/utils/progress_bar.h" +#include "mt-kahypar/utils/reproducible_random.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/i_coarsener.h b/mt-kahypar/partition/coarsening/i_coarsener.h index eead947c6..021ea7599 100644 --- a/mt-kahypar/partition/coarsening/i_coarsener.h +++ b/mt-kahypar/partition/coarsening/i_coarsener.h @@ -26,14 +26,8 @@ #pragma once -#include - #include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/coarsening/coarsening_commons.h" - namespace mt_kahypar { class ICoarsener { diff --git a/mt-kahypar/partition/coarsening/i_uncoarsener.h b/mt-kahypar/partition/coarsening/i_uncoarsener.h index 7e86d5af2..c19417e2e 100644 --- a/mt-kahypar/partition/coarsening/i_uncoarsener.h +++ b/mt-kahypar/partition/coarsening/i_uncoarsener.h @@ -28,8 +28,6 @@ #pragma once -#include "mt-kahypar/macros.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/multilevel_coarsener.h b/mt-kahypar/partition/coarsening/multilevel_coarsener.h index a89948998..08f781f39 100644 --- a/mt-kahypar/partition/coarsening/multilevel_coarsener.h +++ b/mt-kahypar/partition/coarsening/multilevel_coarsener.h @@ -30,26 +30,24 @@ #include #include "tbb/concurrent_queue.h" -#include "tbb/task_group.h" #include "tbb/parallel_for.h" #include "tbb/parallel_reduce.h" - -#include "kahypar-resources/meta/mandatory.h" +#include "tbb/task_group.h" #include "include/libmtkahypartypes.h" +#include "kahypar-resources/meta/mandatory.h" + +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/coarsening/i_coarsener.h" #include "mt-kahypar/partition/coarsening/multilevel_coarsener_base.h" #include "mt-kahypar/partition/coarsening/multilevel_vertex_pair_rater.h" -#include "mt-kahypar/partition/coarsening/i_coarsener.h" #include "mt-kahypar/partition/coarsening/policies/rating_acceptance_policy.h" #include "mt-kahypar/partition/coarsening/policies/rating_heavy_node_penalty_policy.h" #include "mt-kahypar/partition/coarsening/policies/rating_score_policy.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/progress_bar.h" #include "mt-kahypar/utils/randomize.h" -#include "mt-kahypar/utils/stats.h" -#include "mt-kahypar/utils/timer.h" namespace mt_kahypar { template diff --git a/mt-kahypar/partition/coarsening/multilevel_uncoarsener.cpp b/mt-kahypar/partition/coarsening/multilevel_uncoarsener.cpp index 39197062f..3e86656fa 100644 --- a/mt-kahypar/partition/coarsening/multilevel_uncoarsener.cpp +++ b/mt-kahypar/partition/coarsening/multilevel_uncoarsener.cpp @@ -30,9 +30,7 @@ #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/utils/stats.h" #include "mt-kahypar/utils/cast.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/multilevel_uncoarsener.h b/mt-kahypar/partition/coarsening/multilevel_uncoarsener.h index 9ee6275d0..fe7374771 100644 --- a/mt-kahypar/partition/coarsening/multilevel_uncoarsener.h +++ b/mt-kahypar/partition/coarsening/multilevel_uncoarsener.h @@ -28,10 +28,10 @@ #pragma once -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/coarsening/coarsening_commons.h" #include "mt-kahypar/partition/coarsening/i_uncoarsener.h" #include "mt-kahypar/partition/coarsening/uncoarsener_base.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/progress_bar.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/multilevel_vertex_pair_rater.h b/mt-kahypar/partition/coarsening/multilevel_vertex_pair_rater.h index b8a11223f..1d2689c6a 100644 --- a/mt-kahypar/partition/coarsening/multilevel_vertex_pair_rater.h +++ b/mt-kahypar/partition/coarsening/multilevel_vertex_pair_rater.h @@ -29,8 +29,6 @@ #include #include -#include -#include #include "tbb/enumerable_thread_specific.h" @@ -38,9 +36,8 @@ #include "kahypar-resources/meta/mandatory.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/coarsening/policies/rating_fixed_vertex_acceptance_policy.h" - +#include "mt-kahypar/partition/context.h" namespace mt_kahypar { template - #include "tbb/parallel_for.h" -#include "tbb/parallel_sort.h" #include "tbb/parallel_scan.h" +#include "tbb/parallel_sort.h" #include "include/libmtkahypartypes.h" #include "kahypar-resources/meta/mandatory.h" + +#include "mt-kahypar/parallel/parallel_prefix_sum.h" +#include "mt-kahypar/partition/coarsening/i_coarsener.h" #include "mt-kahypar/partition/coarsening/nlevel_coarsener_base.h" #include "mt-kahypar/partition/coarsening/nlevel_vertex_pair_rater.h" -#include "mt-kahypar/partition/coarsening/i_coarsener.h" #include "mt-kahypar/partition/coarsening/policies/rating_acceptance_policy.h" #include "mt-kahypar/partition/coarsening/policies/rating_heavy_node_penalty_policy.h" #include "mt-kahypar/partition/coarsening/policies/rating_score_policy.h" -#include "mt-kahypar/parallel/parallel_prefix_sum.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/progress_bar.h" #include "mt-kahypar/utils/randomize.h" -#include "mt-kahypar/utils/stats.h" namespace mt_kahypar { template + #include "tbb/task_group.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/utilities.h" -#include namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/nlevel_uncoarsener.cpp b/mt-kahypar/partition/coarsening/nlevel_uncoarsener.cpp index 1cca04fbe..40132d803 100644 --- a/mt-kahypar/partition/coarsening/nlevel_uncoarsener.cpp +++ b/mt-kahypar/partition/coarsening/nlevel_uncoarsener.cpp @@ -29,10 +29,9 @@ #include "mt-kahypar/partition/coarsening/nlevel_uncoarsener.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/progress_bar.h" #include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/utils/utilities.h" #include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/utils/progress_bar.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/nlevel_uncoarsener.h b/mt-kahypar/partition/coarsening/nlevel_uncoarsener.h index 2aee0dad8..a2cf83d8f 100644 --- a/mt-kahypar/partition/coarsening/nlevel_uncoarsener.h +++ b/mt-kahypar/partition/coarsening/nlevel_uncoarsener.h @@ -30,12 +30,11 @@ #include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/datastructures/streaming_vector.h" +#include "mt-kahypar/partition/coarsening/coarsening_commons.h" #include "mt-kahypar/partition/coarsening/i_uncoarsener.h" #include "mt-kahypar/partition/coarsening/uncoarsener_base.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/coarsening/coarsening_commons.h" -#include "mt-kahypar/datastructures/streaming_vector.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/progress_bar.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/coarsening/nlevel_vertex_pair_rater.h b/mt-kahypar/partition/coarsening/nlevel_vertex_pair_rater.h index 0dc381fd9..db2f94f36 100644 --- a/mt-kahypar/partition/coarsening/nlevel_vertex_pair_rater.h +++ b/mt-kahypar/partition/coarsening/nlevel_vertex_pair_rater.h @@ -28,8 +28,6 @@ #include #include -#include -#include #include "tbb/enumerable_thread_specific.h" @@ -37,8 +35,8 @@ #include "kahypar-resources/meta/mandatory.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/coarsening/policies/rating_fixed_vertex_acceptance_policy.h" +#include "mt-kahypar/partition/context.h" namespace mt_kahypar { template -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/partition/coarsening/coarsening_commons.h" -#include "mt-kahypar/partition/refinement/flows/scheduler.h" +#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/factories.h" +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/factories.h" -#include "mt-kahypar/utils/cast.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/context.cpp b/mt-kahypar/partition/context.cpp index 93cf1b187..38bae0921 100644 --- a/mt-kahypar/partition/context.cpp +++ b/mt-kahypar/partition/context.cpp @@ -29,8 +29,8 @@ #include -#include "mt-kahypar/utils/exception.h" #include "mt-kahypar/partition/conversion.h" +#include "mt-kahypar/utils/exception.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/context.h b/mt-kahypar/partition/context.h index 19eef0851..1f97ff815 100644 --- a/mt-kahypar/partition/context.h +++ b/mt-kahypar/partition/context.h @@ -324,4 +324,4 @@ class Context { std::ostream & operator<< (std::ostream& str, const Context& context); // clang-format on -} // namespace mt_kahypar +} // namespace mt_kahypar diff --git a/mt-kahypar/partition/context_enum_classes.cpp b/mt-kahypar/partition/context_enum_classes.cpp index 913dab8b7..e35263367 100644 --- a/mt-kahypar/partition/context_enum_classes.cpp +++ b/mt-kahypar/partition/context_enum_classes.cpp @@ -28,9 +28,11 @@ #include "context_enum_classes.h" #include "include/libmtkahypartypes.h" + #include "mt-kahypar/macros.h" #include "mt-kahypar/utils/exception.h" + namespace mt_kahypar { std::ostream & operator<< (std::ostream& os, const Type& type) { diff --git a/mt-kahypar/partition/context_enum_classes.h b/mt-kahypar/partition/context_enum_classes.h index 3d4aefdda..753be0c07 100644 --- a/mt-kahypar/partition/context_enum_classes.h +++ b/mt-kahypar/partition/context_enum_classes.h @@ -27,11 +27,12 @@ #pragma once +#include #include #include -#include #include "include/libmtkahypartypes.h" + #include "mt-kahypar/macros.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/conversion.cpp b/mt-kahypar/partition/conversion.cpp index 81362bfd0..07372a2a7 100644 --- a/mt-kahypar/partition/conversion.cpp +++ b/mt-kahypar/partition/conversion.cpp @@ -24,10 +24,8 @@ * SOFTWARE. ******************************************************************************/ - #include "mt-kahypar/partition/conversion.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/conversion.h b/mt-kahypar/partition/conversion.h index 19b683da7..9566e36b8 100644 --- a/mt-kahypar/partition/conversion.h +++ b/mt-kahypar/partition/conversion.h @@ -28,8 +28,8 @@ #include "include/libmtkahypartypes.h" -#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/partition/context_enum_classes.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/deep_multilevel.cpp b/mt-kahypar/partition/deep_multilevel.cpp index d200a496b..b80df7e82 100644 --- a/mt-kahypar/partition/deep_multilevel.cpp +++ b/mt-kahypar/partition/deep_multilevel.cpp @@ -34,18 +34,18 @@ #include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/io/partitioning_output.h" #include "mt-kahypar/macros.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/multilevel.h" #include "mt-kahypar/partition/coarsening/coarsening_commons.h" #include "mt-kahypar/partition/coarsening/multilevel_uncoarsener.h" #include "mt-kahypar/partition/coarsening/nlevel_uncoarsener.h" -#include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" +#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/partition/multilevel.h" #include "mt-kahypar/partition/refinement/gains/bipartitioning_policy.h" -#include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/utils/timer.h" +#include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" #include "mt-kahypar/utils/progress_bar.h" -#include "mt-kahypar/io/partitioning_output.h" +#include "mt-kahypar/utils/timer.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/factories.h b/mt-kahypar/partition/factories.h index cc57ddc6f..6b777b3d1 100644 --- a/mt-kahypar/partition/factories.h +++ b/mt-kahypar/partition/factories.h @@ -29,16 +29,16 @@ #include "kahypar-resources/meta/abstract_factory.h" -#include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/coarsening/coarsening_commons.h" #include "mt-kahypar/partition/coarsening/i_coarsener.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/initial_partitioning/i_initial_partitioner.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/i_rebalancer.h" #include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" #include "mt-kahypar/partition/refinement/fm/fm_commons.h" #include "mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.cpp b/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.cpp index f39b368c6..626e3c9af 100644 --- a/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.cpp +++ b/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.cpp @@ -28,7 +28,6 @@ #include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/initial_partitioning/policies/pseudo_peripheral_start_nodes.h" -#include "mt-kahypar/utils/randomize.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h b/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h index a68080088..e2accd3e2 100644 --- a/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h +++ b/mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h @@ -26,9 +26,9 @@ #pragma once +#include "mt-kahypar/parallel/stl/scalable_queue.h" #include "mt-kahypar/partition/initial_partitioning/i_initial_partitioner.h" #include "mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h" -#include "mt-kahypar/parallel/stl/scalable_queue.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/initial_partitioning_commons.h b/mt-kahypar/partition/initial_partitioning/initial_partitioning_commons.h index 7fe8d5978..0c2677a6e 100644 --- a/mt-kahypar/partition/initial_partitioning/initial_partitioning_commons.h +++ b/mt-kahypar/partition/initial_partitioning/initial_partitioning_commons.h @@ -31,10 +31,10 @@ #include "kahypar-resources/datastructure/kway_priority_queue.h" #pragma GCC diagnostic pop -#include "kahypar-resources/datastructure/fast_reset_flag_array.h" - #include "tbb/enumerable_thread_specific.h" +#include "kahypar-resources/datastructure/fast_reset_flag_array.h" + #include "mt-kahypar/datastructures/hypergraph_common.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h b/mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h index 7aa4b1294..22691e409 100644 --- a/mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h +++ b/mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h @@ -26,23 +26,21 @@ #pragma once -#include #include +#include #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/partition/initial_partitioning/initial_partitioning_commons.h" - +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/factories.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" -#include "mt-kahypar/utils/cast.h" -#include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/utils/range.h" +#include "mt-kahypar/partition/initial_partitioning/initial_partitioning_commons.h" +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/fm/sequential_twoway_fm_refiner.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" - +#include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/utils/range.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/label_propagation_initial_partitioner.cpp b/mt-kahypar/partition/initial_partitioning/label_propagation_initial_partitioner.cpp index e6863c6fb..541e61189 100644 --- a/mt-kahypar/partition/initial_partitioning/label_propagation_initial_partitioner.cpp +++ b/mt-kahypar/partition/initial_partitioning/label_propagation_initial_partitioner.cpp @@ -27,10 +27,8 @@ #include "mt-kahypar/partition/initial_partitioning/label_propagation_initial_partitioner.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" -#include "mt-kahypar/partition/initial_partitioning/policies/pseudo_peripheral_start_nodes.h" #include "mt-kahypar/partition/initial_partitioning/policies/gain_computation_policy.h" -#include "mt-kahypar/utils/randomize.h" +#include "mt-kahypar/partition/initial_partitioning/policies/pseudo_peripheral_start_nodes.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.cpp b/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.cpp index 8f0c235a3..526711ba5 100644 --- a/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.cpp +++ b/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.cpp @@ -32,7 +32,6 @@ #include "mt-kahypar/partition/factories.h" #include "mt-kahypar/partition/initial_partitioning/i_initial_partitioner.h" #include "mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h" -#include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h b/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h index 8de09914a..536e5afd8 100644 --- a/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h +++ b/mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h @@ -28,9 +28,6 @@ #include "tbb/task.h" -#include "include/libmtkahypartypes.h" - - namespace mt_kahypar { template diff --git a/mt-kahypar/partition/initial_partitioning/random_initial_partitioner.cpp b/mt-kahypar/partition/initial_partitioning/random_initial_partitioner.cpp index bc8749b8e..fd8c0007e 100644 --- a/mt-kahypar/partition/initial_partitioning/random_initial_partitioner.cpp +++ b/mt-kahypar/partition/initial_partitioning/random_initial_partitioner.cpp @@ -27,7 +27,6 @@ #include "mt-kahypar/partition/initial_partitioning/random_initial_partitioner.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/randomize.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/all_pair_shortest_path.h b/mt-kahypar/partition/mapping/all_pair_shortest_path.h index 4cf19ae00..ca33918d3 100644 --- a/mt-kahypar/partition/mapping/all_pair_shortest_path.h +++ b/mt-kahypar/partition/mapping/all_pair_shortest_path.h @@ -26,7 +26,6 @@ #pragma once -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/static_graph.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/greedy_mapping.cpp b/mt-kahypar/partition/mapping/greedy_mapping.cpp index 68ea614fb..3201a70ac 100644 --- a/mt-kahypar/partition/mapping/greedy_mapping.cpp +++ b/mt-kahypar/partition/mapping/greedy_mapping.cpp @@ -29,12 +29,12 @@ #include #include -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/mapping/kerninghan_lin.h" -#include "mt-kahypar/datastructures/static_graph.h" #include "mt-kahypar/datastructures/static_bitset.h" +#include "mt-kahypar/datastructures/static_graph.h" +#include "mt-kahypar/definitions.h" #include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/mapping/kerninghan_lin.h" +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/utils/randomize.h" #include "mt-kahypar/utils/utilities.h" diff --git a/mt-kahypar/partition/mapping/greedy_mapping.h b/mt-kahypar/partition/mapping/greedy_mapping.h index aa761b3db..3ffdb2e77 100644 --- a/mt-kahypar/partition/mapping/greedy_mapping.h +++ b/mt-kahypar/partition/mapping/greedy_mapping.h @@ -26,10 +26,9 @@ #pragma once -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/partitioned_graph.h" -#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/mapping/target_graph.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/initial_mapping.cpp b/mt-kahypar/partition/mapping/initial_mapping.cpp index eda22ffdb..c956305a3 100644 --- a/mt-kahypar/partition/mapping/initial_mapping.cpp +++ b/mt-kahypar/partition/mapping/initial_mapping.cpp @@ -29,12 +29,12 @@ #include "tbb/parallel_invoke.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/parallel/memory_pool.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/mapping/greedy_mapping.h" +#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/parallel/memory_pool.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/initial_mapping.h b/mt-kahypar/partition/mapping/initial_mapping.h index be50eed71..2d796a7c4 100644 --- a/mt-kahypar/partition/mapping/initial_mapping.h +++ b/mt-kahypar/partition/mapping/initial_mapping.h @@ -26,7 +26,6 @@ #pragma once -#include "mt-kahypar/macros.h" #include "mt-kahypar/partition/context.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/kerninghan_lin.cpp b/mt-kahypar/partition/mapping/kerninghan_lin.cpp index 3ad14553f..1a5b99755 100644 --- a/mt-kahypar/partition/mapping/kerninghan_lin.cpp +++ b/mt-kahypar/partition/mapping/kerninghan_lin.cpp @@ -27,9 +27,8 @@ #include "mt-kahypar/partition/mapping/kerninghan_lin.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/datastructures/static_bitset.h" +#include "mt-kahypar/partition/metrics.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/kerninghan_lin.h b/mt-kahypar/partition/mapping/kerninghan_lin.h index 761ac167c..aaf3addb8 100644 --- a/mt-kahypar/partition/mapping/kerninghan_lin.h +++ b/mt-kahypar/partition/mapping/kerninghan_lin.h @@ -26,7 +26,6 @@ #pragma once -#include "mt-kahypar/macros.h" #include "mt-kahypar/partition/context.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/set_enumerator.h b/mt-kahypar/partition/mapping/set_enumerator.h index 313169307..ba761437d 100644 --- a/mt-kahypar/partition/mapping/set_enumerator.h +++ b/mt-kahypar/partition/mapping/set_enumerator.h @@ -26,7 +26,6 @@ #pragma once -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/bitset.h" #include "mt-kahypar/datastructures/static_bitset.h" diff --git a/mt-kahypar/partition/mapping/steiner_tree.cpp b/mt-kahypar/partition/mapping/steiner_tree.cpp index ba54f5212..4b4b86c43 100644 --- a/mt-kahypar/partition/mapping/steiner_tree.cpp +++ b/mt-kahypar/partition/mapping/steiner_tree.cpp @@ -24,8 +24,9 @@ * SOFTWARE. ******************************************************************************/ -#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/partition/mapping/steiner_tree.h" + +#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/partition/mapping/all_pair_shortest_path.h" #include "mt-kahypar/partition/mapping/set_enumerator.h" diff --git a/mt-kahypar/partition/mapping/steiner_tree.h b/mt-kahypar/partition/mapping/steiner_tree.h index 26092b28c..8ad23f959 100644 --- a/mt-kahypar/partition/mapping/steiner_tree.h +++ b/mt-kahypar/partition/mapping/steiner_tree.h @@ -26,7 +26,6 @@ #pragma once -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/static_graph.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/mapping/target_graph.cpp b/mt-kahypar/partition/mapping/target_graph.cpp index 3523171d3..0d1481517 100644 --- a/mt-kahypar/partition/mapping/target_graph.cpp +++ b/mt-kahypar/partition/mapping/target_graph.cpp @@ -29,7 +29,6 @@ #include #include -#include "mt-kahypar/datastructures/static_graph.h" #include "mt-kahypar/partition/mapping/steiner_tree.h" #include "mt-kahypar/utils/exception.h" diff --git a/mt-kahypar/partition/mapping/target_graph.h b/mt-kahypar/partition/mapping/target_graph.h index c02f9213a..b7bad2c40 100644 --- a/mt-kahypar/partition/mapping/target_graph.h +++ b/mt-kahypar/partition/mapping/target_graph.h @@ -26,9 +26,8 @@ #pragma once -#include -#include #include +#include #include "tbb/enumerable_thread_specific.h" @@ -43,9 +42,9 @@ #include "tbb/concurrent_unordered_map.h" #endif -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/static_graph.h" #include "mt-kahypar/datastructures/static_bitset.h" +#include "mt-kahypar/datastructures/static_graph.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/atomic_wrapper.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/metrics.cpp b/mt-kahypar/partition/metrics.cpp index 5223a88a4..f0589735a 100644 --- a/mt-kahypar/partition/metrics.cpp +++ b/mt-kahypar/partition/metrics.cpp @@ -27,7 +27,6 @@ #include "mt-kahypar/partition/metrics.h" -#include #include #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/multilevel.cpp b/mt-kahypar/partition/multilevel.cpp index 124d1ffea..5572b376a 100644 --- a/mt-kahypar/partition/multilevel.cpp +++ b/mt-kahypar/partition/multilevel.cpp @@ -34,22 +34,22 @@ #include "include/libmtkahypartypes.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/deep_multilevel.h" #include "mt-kahypar/partition/factories.h" +#include "mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h" #include "mt-kahypar/partition/preprocessing/sparsification/degree_zero_hn_remover.h" #include "mt-kahypar/partition/preprocessing/sparsification/large_he_remover.h" -#include "mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h" #include "mt-kahypar/partition/recursive_bipartitioning.h" -#include "mt-kahypar/partition/deep_multilevel.h" #ifdef KAHYPAR_ENABLE_STEINER_TREE_METRIC #include "mt-kahypar/partition/mapping/initial_mapping.h" #endif -#include "mt-kahypar/parallel/memory_pool.h" #include "mt-kahypar/io/partitioning_output.h" +#include "mt-kahypar/parallel/memory_pool.h" #include "mt-kahypar/partition/coarsening/multilevel_uncoarsener.h" #include "mt-kahypar/partition/coarsening/nlevel_uncoarsener.h" #include "mt-kahypar/utils/cast.h" -#include "mt-kahypar/utils/utilities.h" #include "mt-kahypar/utils/exception.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/partitioner.cpp b/mt-kahypar/partition/partitioner.cpp index 66200838a..10605b8f5 100644 --- a/mt-kahypar/partition/partitioner.cpp +++ b/mt-kahypar/partition/partitioner.cpp @@ -27,25 +27,24 @@ #include "partitioner.h" -#include "tbb/parallel_sort.h" #include "tbb/parallel_reduce.h" +#include "tbb/parallel_sort.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/partitioning_output.h" +#include "mt-kahypar/partition/deep_multilevel.h" +#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/partition/multilevel.h" +#include "mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h" #include "mt-kahypar/partition/preprocessing/sparsification/degree_zero_hn_remover.h" #include "mt-kahypar/partition/preprocessing/sparsification/large_he_remover.h" -#include "mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h" #include "mt-kahypar/partition/recursive_bipartitioning.h" -#include "mt-kahypar/partition/deep_multilevel.h" -#include "mt-kahypar/partition/mapping/target_graph.h" #ifdef KAHYPAR_ENABLE_STEINER_TREE_METRIC #include "mt-kahypar/partition/mapping/initial_mapping.h" #endif +#include "mt-kahypar/utils/exception.h" #include "mt-kahypar/utils/hypergraph_statistics.h" -#include "mt-kahypar/utils/stats.h" #include "mt-kahypar/utils/timer.h" -#include "mt-kahypar/utils/exception.h" namespace mt_kahypar { @@ -70,7 +69,7 @@ namespace mt_kahypar { const std::string type = Hypergraph::is_graph ? "graphs" : "hypergraphs"; throw InvalidInputException( "We currently only support mappings of " + type + " onto target graphs with at " - "most " + STR(max_k) + "nodes!"); + "most " + std::to_string(max_k) + "nodes!"); } if ( context.mapping.largest_he_fraction > 0.0 ) { diff --git a/mt-kahypar/partition/partitioner_facade.cpp b/mt-kahypar/partition/partitioner_facade.cpp index 1677367f7..ffa07d1ce 100644 --- a/mt-kahypar/partition/partitioner_facade.cpp +++ b/mt-kahypar/partition/partitioner_facade.cpp @@ -28,15 +28,13 @@ #include "mt-kahypar/partition/partitioner_facade.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/partitioner.h" -#include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/io/csv_output.h" +#include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/io/partitioning_output.h" #include "mt-kahypar/io/sql_plottools_serializer.h" -#include "mt-kahypar/utils/cast.h" -#include "mt-kahypar/utils/randomize.h" #include "mt-kahypar/partition/conversion.h" -#include "mt-kahypar/utils/exception.h" +#include "mt-kahypar/partition/partitioner.h" +#include "mt-kahypar/utils/cast.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.cpp b/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.cpp index 42c67b6d5..fa9f1565a 100644 --- a/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.cpp +++ b/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.cpp @@ -27,13 +27,13 @@ #include "local_moving_modularity.h" +#include +#include + #include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/utils/floating_point_comparisons.h" -#include "mt-kahypar/parallel/stl/thread_locals.h" +#include "mt-kahypar/utils/randomize.h" -#include -#include namespace mt_kahypar::metrics { template diff --git a/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.h b/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.h index 6a05c3f14..2bb9f680a 100644 --- a/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.h +++ b/mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.h @@ -28,20 +28,16 @@ #pragma once +#include -#include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/datastructures/buffered_vector.h" - -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/graph.h" -#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/datastructures/sparse_map.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/atomic_wrapper.h" -#include "mt-kahypar/utils/randomize.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/reproducible_random.h" - -#include "gtest/gtest_prod.h" - namespace mt_kahypar::metrics { template double modularity(const Graph& graph, const ds::Clustering& communities); diff --git a/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.cpp b/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.cpp index cafd63cdb..20ae7cd1c 100644 --- a/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.cpp +++ b/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.cpp @@ -25,7 +25,6 @@ * SOFTWARE. ******************************************************************************/ - #include "parallel_louvain.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h b/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h index 783f91810..9efad97b4 100644 --- a/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h +++ b/mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h @@ -25,7 +25,6 @@ * SOFTWARE. ******************************************************************************/ - #pragma once #include "mt-kahypar/partition/preprocessing/community_detection/local_moving_modularity.h" diff --git a/mt-kahypar/partition/preprocessing/sparsification/degree_zero_hn_remover.h b/mt-kahypar/partition/preprocessing/sparsification/degree_zero_hn_remover.h index 44655ea88..3ba1f039b 100644 --- a/mt-kahypar/partition/preprocessing/sparsification/degree_zero_hn_remover.h +++ b/mt-kahypar/partition/preprocessing/sparsification/degree_zero_hn_remover.h @@ -24,13 +24,11 @@ * SOFTWARE. ******************************************************************************/ - #pragma once #include "tbb/parallel_sort.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/datastructures/streaming_vector.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/preprocessing/sparsification/large_he_remover.h b/mt-kahypar/partition/preprocessing/sparsification/large_he_remover.h index dc56f399c..5ccd4cbe6 100644 --- a/mt-kahypar/partition/preprocessing/sparsification/large_he_remover.h +++ b/mt-kahypar/partition/preprocessing/sparsification/large_he_remover.h @@ -26,9 +26,9 @@ #pragma once +#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/recursive_bipartitioning.cpp b/mt-kahypar/partition/recursive_bipartitioning.cpp index 82fae1cfb..4cc0498dc 100644 --- a/mt-kahypar/partition/recursive_bipartitioning.cpp +++ b/mt-kahypar/partition/recursive_bipartitioning.cpp @@ -27,26 +27,22 @@ #include "mt-kahypar/partition/recursive_bipartitioning.h" -#include "tbb/task_group.h" - #include #include +#include "tbb/task_group.h" + +#include "mt-kahypar/datastructures/fixed_vertex_support.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/partition/multilevel.h" -#include "mt-kahypar/datastructures/fixed_vertex_support.h" #include "mt-kahypar/partition/refinement/gains/bipartitioning_policy.h" #ifdef KAHYPAR_ENABLE_STEINER_TREE_METRIC #include "mt-kahypar/partition/mapping/initial_mapping.h" #endif -#include "mt-kahypar/io/partitioning_output.h" #include "mt-kahypar/parallel/memory_pool.h" -#include "mt-kahypar/utils/randomize.h" -#include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/utils/timer.h" - #include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/utils/timer.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.cpp b/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.cpp index c12d13732..a98425f7e 100644 --- a/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.cpp +++ b/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.cpp @@ -26,15 +26,15 @@ #include "deterministic_label_propagation.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/metrics.h" +#include "tbb/parallel_reduce.h" +#include "tbb/parallel_sort.h" + #include "mt-kahypar/parallel/chunking.h" #include "mt-kahypar/parallel/parallel_counting_sort.h" +#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" #include "mt-kahypar/utils/cast.h" -#include -#include - namespace mt_kahypar { template @@ -509,6 +509,5 @@ namespace mt_kahypar { #define DETERMINISTIC_LABEL_PROPAGATION_REFINER(X) DeterministicLabelPropagationRefiner } - INSTANTIATE_CLASS_WITH_VALID_TRAITS(DETERMINISTIC_LABEL_PROPAGATION_REFINER) } // namespace mt_kahypar diff --git a/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.h b/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.h index 7884c4a6b..4771449f5 100644 --- a/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.h +++ b/mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.h @@ -29,11 +29,9 @@ #include "mt-kahypar/datastructures/buffered_vector.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/i_rebalancer.h" - -#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/utils/reproducible_random.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/do_nothing_refiner.h b/mt-kahypar/partition/refinement/do_nothing_refiner.h index e86a77cf0..13a2c9ea7 100644 --- a/mt-kahypar/partition/refinement/do_nothing_refiner.h +++ b/mt-kahypar/partition/refinement/do_nothing_refiner.h @@ -26,12 +26,7 @@ #pragma once -#include -#include -#include -#include - -#include "mt-kahypar/partition/refinement/i_refiner.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" namespace mt_kahypar { class DoNothingRefiner final : public IRebalancer { diff --git a/mt-kahypar/partition/refinement/flows/do_nothing_refiner.h b/mt-kahypar/partition/refinement/flows/do_nothing_refiner.h index 6078a860e..9bd9e0f67 100644 --- a/mt-kahypar/partition/refinement/flows/do_nothing_refiner.h +++ b/mt-kahypar/partition/refinement/flows/do_nothing_refiner.h @@ -26,11 +26,6 @@ #pragma once -#include -#include -#include -#include - #include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/flows/flow_common.h b/mt-kahypar/partition/refinement/flows/flow_common.h index 7acabc927..12d15f27e 100644 --- a/mt-kahypar/partition/refinement/flows/flow_common.h +++ b/mt-kahypar/partition/refinement/flows/flow_common.h @@ -24,10 +24,11 @@ * SOFTWARE. ******************************************************************************/ -#include "datastructure/flow_hypergraph_builder.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "definitions.h" + namespace mt_kahypar { enum class MoveSequenceState : uint8_t { diff --git a/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.cpp b/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.cpp index 732b4816f..96d3b7f00 100644 --- a/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.cpp +++ b/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.cpp @@ -28,10 +28,10 @@ #include "mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h" #include "tbb/blocked_range.h" +#include "tbb/parallel_for.h" #include "tbb/parallel_invoke.h" #include "tbb/parallel_reduce.h" #include "tbb/parallel_scan.h" -#include "tbb/parallel_for.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h b/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h index 08daf5342..63ce6af49 100644 --- a/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h +++ b/mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h @@ -27,10 +27,10 @@ #pragma once -#include "datastructure/flow_hypergraph.h" - #include "mt-kahypar/macros.h" +#include "datastructure/flow_hypergraph.h" + namespace mt_kahypar { class FlowHypergraphBuilder : public whfc::FlowHypergraph { diff --git a/mt-kahypar/partition/refinement/flows/flow_refiner.cpp b/mt-kahypar/partition/refinement/flows/flow_refiner.cpp index 35b5b475d..f8139f113 100644 --- a/mt-kahypar/partition/refinement/flows/flow_refiner.cpp +++ b/mt-kahypar/partition/refinement/flows/flow_refiner.cpp @@ -26,12 +26,12 @@ ******************************************************************************/ #include "mt-kahypar/partition/refinement/flows/flow_refiner.h" -#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/utils/utilities.h" #include "tbb/concurrent_queue.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/flows/flow_refiner.h b/mt-kahypar/partition/refinement/flows/flow_refiner.h index a32a5dd14..a8c477741 100644 --- a/mt-kahypar/partition/refinement/flows/flow_refiner.h +++ b/mt-kahypar/partition/refinement/flows/flow_refiner.h @@ -29,20 +29,17 @@ #include -#include "algorithm/hyperflowcutter.h" -#include "algorithm/sequential_push_relabel.h" -#include "algorithm/parallel_push_relabel.h" - #include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h" #include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" -#include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" -#include "mt-kahypar/parallel/stl/scalable_queue.h" -#include "mt-kahypar/partition/refinement/flows/sequential_construction.h" #include "mt-kahypar/partition/refinement/flows/parallel_construction.h" -#include "mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h" +#include "mt-kahypar/partition/refinement/flows/sequential_construction.h" #include "mt-kahypar/utils/cast.h" +#include "algorithm/hyperflowcutter.h" +#include "algorithm/parallel_push_relabel.h" +#include "algorithm/sequential_push_relabel.h" + namespace mt_kahypar { template diff --git a/mt-kahypar/partition/refinement/flows/i_flow_refiner.h b/mt-kahypar/partition/refinement/flows/i_flow_refiner.h index a38b59c41..1c18d267a 100644 --- a/mt-kahypar/partition/refinement/flows/i_flow_refiner.h +++ b/mt-kahypar/partition/refinement/flows/i_flow_refiner.h @@ -26,13 +26,9 @@ #pragma once - #include "include/libmtkahypartypes.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/refinement/flows/flow_common.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/flows/scheduler.cpp b/mt-kahypar/partition/refinement/flows/scheduler.cpp index a01774794..63c2c583e 100644 --- a/mt-kahypar/partition/refinement/flows/scheduler.cpp +++ b/mt-kahypar/partition/refinement/flows/scheduler.cpp @@ -26,12 +26,10 @@ #include "mt-kahypar/partition/refinement/flows/scheduler.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/utils/utilities.h" #include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/flows/scheduler.h b/mt-kahypar/partition/refinement/flows/scheduler.h index 738fa17cd..393f03b47 100644 --- a/mt-kahypar/partition/refinement/flows/scheduler.h +++ b/mt-kahypar/partition/refinement/flows/scheduler.h @@ -26,13 +26,13 @@ #pragma once +#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" +#include "mt-kahypar/partition/refinement/flows/problem_construction.h" #include "mt-kahypar/partition/refinement/flows/quotient_graph.h" #include "mt-kahypar/partition/refinement/flows/refiner_adapter.h" -#include "mt-kahypar/partition/refinement/flows/problem_construction.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/flows/sequential_construction.cpp b/mt-kahypar/partition/refinement/flows/sequential_construction.cpp index 731cbc56e..a873c2270 100644 --- a/mt-kahypar/partition/refinement/flows/sequential_construction.cpp +++ b/mt-kahypar/partition/refinement/flows/sequential_construction.cpp @@ -28,7 +28,6 @@ #include "kahypar-resources/utils/math.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/parallel/stl/scalable_queue.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" diff --git a/mt-kahypar/partition/refinement/flows/sequential_construction.h b/mt-kahypar/partition/refinement/flows/sequential_construction.h index e2818ad0c..22460b81b 100644 --- a/mt-kahypar/partition/refinement/flows/sequential_construction.h +++ b/mt-kahypar/partition/refinement/flows/sequential_construction.h @@ -28,14 +28,14 @@ #include -#include "algorithm/hyperflowcutter.h" -#include "algorithm/sequential_push_relabel.h" - -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" -#include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/refinement/flows/flow_hypergraph_builder.h" +#include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" + +#include "algorithm/hyperflowcutter.h" +#include "algorithm/sequential_push_relabel.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/fm_commons.cpp b/mt-kahypar/partition/refinement/fm/fm_commons.cpp index 3267d61d5..dd28c922f 100644 --- a/mt-kahypar/partition/refinement/fm/fm_commons.cpp +++ b/mt-kahypar/partition/refinement/fm/fm_commons.cpp @@ -24,13 +24,13 @@ * SOFTWARE. ******************************************************************************/ +#include "mt-kahypar/partition/refinement/fm/fm_commons.h" + #include #include -#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/partition/refinement/fm/fm_commons.h" - +#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" namespace mt_kahypar { template diff --git a/mt-kahypar/partition/refinement/fm/fm_commons.h b/mt-kahypar/partition/refinement/fm/fm_commons.h index 97ee1f34b..1a3d48f75 100644 --- a/mt-kahypar/partition/refinement/fm/fm_commons.h +++ b/mt-kahypar/partition/refinement/fm/fm_commons.h @@ -28,15 +28,14 @@ #include -#include -#include -#include -#include +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include -#include +#include "mt-kahypar/datastructures/priority_queue.h" +#include "mt-kahypar/parallel/work_stack.h" +#include "mt-kahypar/partition/context.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/global_rollback.cpp b/mt-kahypar/partition/refinement/fm/global_rollback.cpp index 143b611ba..372936a8e 100644 --- a/mt-kahypar/partition/refinement/fm/global_rollback.cpp +++ b/mt-kahypar/partition/refinement/fm/global_rollback.cpp @@ -28,13 +28,9 @@ #include "tbb/parallel_scan.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/utils/timer.h" -#include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" #include "mt-kahypar/datastructures/bitset.h" #include "mt-kahypar/datastructures/pin_count_snapshot.h" +#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" namespace mt_kahypar { @@ -434,9 +430,6 @@ namespace mt_kahypar { } }); - - size_t num_unbalanced_slots = 0; - size_t overloaded = 0; for (PartitionID i = 0; i < context.partition.k; ++i) { if (phg.partWeight(i) > maxPartWeights[i]) { @@ -465,10 +458,6 @@ namespace mt_kahypar { overloaded++; } - if (overloaded > 0) { - num_unbalanced_slots++; - } - if (overloaded == 0 && gain_sum > best_gain) { best_index = localMoveID + 1; best_gain = gain_sum; diff --git a/mt-kahypar/partition/refinement/fm/global_rollback.h b/mt-kahypar/partition/refinement/fm/global_rollback.h index 950412ad5..5eda4809d 100644 --- a/mt-kahypar/partition/refinement/fm/global_rollback.h +++ b/mt-kahypar/partition/refinement/fm/global_rollback.h @@ -30,7 +30,6 @@ #include "mt-kahypar/partition/refinement/fm/fm_commons.h" - namespace mt_kahypar { template diff --git a/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.cpp b/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.cpp index 9d5884fe2..fe6083bc3 100644 --- a/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.cpp +++ b/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.cpp @@ -27,10 +27,10 @@ #include "mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h" -#include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/refinement/fm/stop_rule.h" +#include "mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h" +#include "mt-kahypar/partition/refinement/fm/strategies/local_unconstrained_strategy.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h" -#include "mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h b/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h index aaf009944..9f08463cd 100644 --- a/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h +++ b/mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h @@ -28,16 +28,11 @@ #pragma once -#include -#include - -#include "mt-kahypar/datastructures/sparse_map.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/refinement/fm/fm_commons.h" -#include "mt-kahypar/partition/refinement/fm/stop_rule.h" namespace mt_kahypar { - template class LocalizedKWayFM { public: diff --git a/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp b/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp index ae0b94de7..eaa23d53d 100644 --- a/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp +++ b/mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp @@ -25,20 +25,19 @@ * SOFTWARE. ******************************************************************************/ -#include - #include "mt-kahypar/partition/refinement/fm/multitry_kway_fm.h" +#include + #include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/partition/factories.h" // TODO removing this could make compilation a lot faster +#include "mt-kahypar/partition/factories.h" // TODO removing this could make compilation a lot faster #include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/utils/memory_tree.h" #include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/utils/memory_tree.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { - using ds::StreamingVector; template MultiTryKWayFM::MultiTryKWayFM(const HypernodeID num_hypernodes, diff --git a/mt-kahypar/partition/refinement/fm/multitry_kway_fm.h b/mt-kahypar/partition/refinement/fm/multitry_kway_fm.h index 94fdf7740..2f08bbae4 100644 --- a/mt-kahypar/partition/refinement/fm/multitry_kway_fm.h +++ b/mt-kahypar/partition/refinement/fm/multitry_kway_fm.h @@ -30,13 +30,12 @@ #include #include "mt-kahypar/partition/context.h" - -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/i_rebalancer.h" -#include "mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h" #include "mt-kahypar/partition/refinement/fm/global_rollback.h" +#include "mt-kahypar/partition/refinement/fm/localized_kway_fm_core.h" #include "mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/sequential_twoway_fm_refiner.h b/mt-kahypar/partition/refinement/fm/sequential_twoway_fm_refiner.h index 99f5acba0..6a3a56c99 100644 --- a/mt-kahypar/partition/refinement/fm/sequential_twoway_fm_refiner.h +++ b/mt-kahypar/partition/refinement/fm/sequential_twoway_fm_refiner.h @@ -32,7 +32,7 @@ #pragma GCC diagnostic pop #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" +#include "mt-kahypar/partition/metrics.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/stop_rule.h b/mt-kahypar/partition/refinement/fm/stop_rule.h index 4e2dbf1bd..bf3ac4cb1 100644 --- a/mt-kahypar/partition/refinement/fm/stop_rule.h +++ b/mt-kahypar/partition/refinement/fm/stop_rule.h @@ -27,7 +27,7 @@ #pragma once -#include +#include "mt-kahypar/datastructures/hypergraph_common.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h b/mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h index 09fc6d619..575452bc2 100644 --- a/mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h +++ b/mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h @@ -30,7 +30,6 @@ #include "mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h" #include "mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h" - namespace mt_kahypar { template diff --git a/mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h b/mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h index 303aa71ed..36ac92c3d 100644 --- a/mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h +++ b/mt-kahypar/partition/refinement/fm/strategies/i_fm_strategy.h @@ -28,9 +28,8 @@ #include -#include "mt-kahypar/datastructures/streaming_vector.h" #include "mt-kahypar/macros.h" -#include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/refinement/fm/fm_commons.h" #include "mt-kahypar/utils/cast.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h b/mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h index 6d7e4ff4c..17b41e47c 100644 --- a/mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h +++ b/mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h @@ -31,7 +31,6 @@ #include "mt-kahypar/partition/refinement/fm/fm_commons.h" - namespace mt_kahypar { /* diff --git a/mt-kahypar/partition/refinement/fm/strategies/local_unconstrained_strategy.h b/mt-kahypar/partition/refinement/fm/strategies/local_unconstrained_strategy.h index 35e73a481..6c38ca386 100644 --- a/mt-kahypar/partition/refinement/fm/strategies/local_unconstrained_strategy.h +++ b/mt-kahypar/partition/refinement/fm/strategies/local_unconstrained_strategy.h @@ -31,7 +31,6 @@ #include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/partition/refinement/fm/fm_commons.h" - namespace mt_kahypar { /* diff --git a/mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h b/mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h index b952e552d..69dcf70f6 100644 --- a/mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h +++ b/mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h @@ -31,7 +31,6 @@ #include "mt-kahypar/partition/refinement/fm/strategies/local_gain_cache_strategy.h" #include "mt-kahypar/partition/refinement/fm/strategies/local_unconstrained_strategy.h" - namespace mt_kahypar { template diff --git a/mt-kahypar/partition/refinement/gains/bipartitioning_policy.h b/mt-kahypar/partition/refinement/gains/bipartitioning_policy.h index 196a2e8eb..a68efb909 100644 --- a/mt-kahypar/partition/refinement/gains/bipartitioning_policy.h +++ b/mt-kahypar/partition/refinement/gains/bipartitioning_policy.h @@ -26,15 +26,12 @@ #pragma once -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/macros.h" +#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar { - struct BipartitioningPolicy { static bool useCutNetSplitting(const GainPolicy policy) { switch(policy) { diff --git a/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.cpp b/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.cpp index 50ac8c25e..7347e1abe 100644 --- a/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.cpp +++ b/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.cpp @@ -26,9 +26,9 @@ #include "mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h" -#include "tbb/parallel_for.h" -#include "tbb/enumerable_thread_specific.h" #include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h b/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h index 4b6bb5e47..a956a9010 100644 --- a/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h +++ b/mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h @@ -26,14 +26,12 @@ #pragma once -#include "kahypar-resources/meta/policy_registry.h" - -#include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h b/mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h index 7af5970d0..1aefd4d10 100644 --- a/mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h +++ b/mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h @@ -26,14 +26,11 @@ #pragma once -#include - #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" +#include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/cut/cut_rollback.h b/mt-kahypar/partition/refinement/gains/cut/cut_rollback.h index ff0b29102..07625dbc3 100644 --- a/mt-kahypar/partition/refinement/gains/cut/cut_rollback.h +++ b/mt-kahypar/partition/refinement/gains/cut/cut_rollback.h @@ -27,7 +27,6 @@ #pragma once #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/macros.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.cpp b/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.cpp index da1244a14..d2aad142a 100644 --- a/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.cpp +++ b/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.cpp @@ -26,9 +26,9 @@ #include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" -#include "tbb/parallel_for.h" -#include "tbb/enumerable_thread_specific.h" #include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h b/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h index d98ee8ff0..91c082de6 100644 --- a/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h +++ b/mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h @@ -26,14 +26,12 @@ #pragma once -#include "kahypar-resources/meta/policy_registry.h" - -#include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/gain_cache_ptr.h b/mt-kahypar/partition/refinement/gains/gain_cache_ptr.h index 49b046f0f..1b3f08ba5 100644 --- a/mt-kahypar/partition/refinement/gains/gain_cache_ptr.h +++ b/mt-kahypar/partition/refinement/gains/gain_cache_ptr.h @@ -26,15 +26,11 @@ #pragma once -#include "kahypar-resources/meta/typelist.h" - -#include "mt-kahypar/definitions.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/macros.h" #include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" #include "mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" #include "mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h" #ifdef KAHYPAR_ENABLE_STEINER_TREE_METRIC #include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h" diff --git a/mt-kahypar/partition/refinement/gains/gain_computation_base.h b/mt-kahypar/partition/refinement/gains/gain_computation_base.h index dd7833630..e438ef43b 100644 --- a/mt-kahypar/partition/refinement/gains/gain_computation_base.h +++ b/mt-kahypar/partition/refinement/gains/gain_computation_base.h @@ -28,11 +28,10 @@ #include -#include "kahypar-resources/meta/mandatory.h" - #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/partition/metrics.h" +#include "kahypar-resources/meta/mandatory.h" + #include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/randomize.h" diff --git a/mt-kahypar/partition/refinement/gains/gain_definitions.h b/mt-kahypar/partition/refinement/gains/gain_definitions.h index a0c1c2066..489a5872c 100644 --- a/mt-kahypar/partition/refinement/gains/gain_definitions.h +++ b/mt-kahypar/partition/refinement/gains/gain_definitions.h @@ -26,45 +26,43 @@ #pragma once -#include "kahypar-resources/meta/typelist.h" #include "kahypar-resources/meta/policy_registry.h" +#include "kahypar-resources/meta/typelist.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_rollback.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_attributed_gains.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_flow_network_construction.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_rollback.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h" #include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" #include "mt-kahypar/partition/refinement/gains/cut/cut_flow_network_construction.h" +#include "mt-kahypar/partition/refinement/gains/cut/cut_gain_cache.h" +#include "mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h" +#include "mt-kahypar/partition/refinement/gains/cut/cut_rollback.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_attributed_gains.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_flow_network_construction.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_rollback.h" #ifdef KAHYPAR_ENABLE_SOED_METRIC #include "mt-kahypar/partition/refinement/gains/soed/soed_attributed_gains.h" -#include "mt-kahypar/partition/refinement/gains/soed/soed_gain_computation.h" +#include "mt-kahypar/partition/refinement/gains/soed/soed_flow_network_construction.h" #include "mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h" +#include "mt-kahypar/partition/refinement/gains/soed/soed_gain_computation.h" #include "mt-kahypar/partition/refinement/gains/soed/soed_rollback.h" -#include "mt-kahypar/partition/refinement/gains/soed/soed_flow_network_construction.h" #endif #ifdef KAHYPAR_ENABLE_STEINER_TREE_METRIC #include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_attributed_gains.h" -#include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_computation.h" +#include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_flow_network_construction.h" #include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h" +#include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_computation.h" #include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_rollback.h" -#include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_flow_network_construction.h" #endif #ifdef KAHYPAR_ENABLE_GRAPH_PARTITIONING_FEATURES #ifdef KAHYPAR_ENABLE_STEINER_TREE_METRIC #include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_attributed_gains_for_graphs.h" -#include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_computation_for_graphs.h" -#include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h" #include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_flow_network_construction_for_graphs.h" +#include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h" +#include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_computation_for_graphs.h" #endif -#include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" #include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_attributed_gains_for_graphs.h" +#include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" #endif #include "mt-kahypar/macros.h" diff --git a/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.cpp b/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.cpp index 3f9812d38..ada71e168 100644 --- a/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.cpp +++ b/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.cpp @@ -26,9 +26,9 @@ #include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" -#include "tbb/parallel_for.h" -#include "tbb/enumerable_thread_specific.h" #include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h b/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h index 36d397a77..47130c0cc 100644 --- a/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h +++ b/mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h @@ -26,16 +26,12 @@ #pragma once -#include - -#include "kahypar-resources/meta/policy_registry.h" - -#include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h b/mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h index 6146eb053..67e57e63e 100644 --- a/mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h +++ b/mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h @@ -26,12 +26,9 @@ #pragma once -#include - +#include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" #include "mt-kahypar/partition/refinement/gains/km1/km1_attributed_gains.h" -#include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/km1/km1_rollback.h b/mt-kahypar/partition/refinement/gains/km1/km1_rollback.h index 8943fed3a..2927bace5 100644 --- a/mt-kahypar/partition/refinement/gains/km1/km1_rollback.h +++ b/mt-kahypar/partition/refinement/gains/km1/km1_rollback.h @@ -29,7 +29,6 @@ #include #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/macros.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.cpp b/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.cpp index 5c4d010ac..7933bcd46 100644 --- a/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.cpp +++ b/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.cpp @@ -26,9 +26,9 @@ #include "mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h" -#include "tbb/parallel_for.h" -#include "tbb/enumerable_thread_specific.h" #include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h b/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h index 4fcc30a6e..bcaaf071c 100644 --- a/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h +++ b/mt-kahypar/partition/refinement/gains/soed/soed_gain_cache.h @@ -26,16 +26,12 @@ #pragma once -#include - -#include "kahypar-resources/meta/policy_registry.h" - -#include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/context_enum_classes.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/soed/soed_gain_computation.h b/mt-kahypar/partition/refinement/gains/soed/soed_gain_computation.h index 27683723e..7cf04512d 100644 --- a/mt-kahypar/partition/refinement/gains/soed/soed_gain_computation.h +++ b/mt-kahypar/partition/refinement/gains/soed/soed_gain_computation.h @@ -26,12 +26,9 @@ #pragma once -#include - +#include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" #include "mt-kahypar/partition/refinement/gains/soed/soed_attributed_gains.h" -#include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/soed/soed_rollback.h b/mt-kahypar/partition/refinement/gains/soed/soed_rollback.h index e8ef478dc..e93a05ab2 100644 --- a/mt-kahypar/partition/refinement/gains/soed/soed_rollback.h +++ b/mt-kahypar/partition/refinement/gains/soed/soed_rollback.h @@ -29,7 +29,6 @@ #include #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/partition/refinement/gains/cut/cut_rollback.h" #include "mt-kahypar/partition/refinement/gains/km1/km1_rollback.h" diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_attributed_gains.h b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_attributed_gains.h index 64f9bbeaf..e9df3a5aa 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_attributed_gains.h +++ b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_attributed_gains.h @@ -27,7 +27,6 @@ #pragma once #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/partition/mapping/target_graph.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.cpp b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.cpp index ebd0dd195..0bbcb981e 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.cpp +++ b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.cpp @@ -26,9 +26,9 @@ #include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h" -#include "tbb/parallel_for.h" -#include "tbb/enumerable_thread_specific.h" #include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h index 2e19423cf..7cfb10390 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h +++ b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_cache.h @@ -26,22 +26,17 @@ #pragma once -#include - -#include "kahypar-resources/meta/policy_registry.h" - #include "tbb/parallel_invoke.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/datastructures/connectivity_set.h" #include "mt-kahypar/datastructures/delta_connectivity_set.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_computation.h b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_computation.h index 742cc0892..207f6982b 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_computation.h +++ b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_gain_computation.h @@ -26,16 +26,13 @@ #pragma once -#include - #include "tbb/enumerable_thread_specific.h" +#include "mt-kahypar/datastructures/sparse_map.h" +#include "mt-kahypar/datastructures/static_bitset.h" +#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" #include "mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_attributed_gains.h" -#include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/datastructures/static_bitset.h" -#include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/parallel/stl/scalable_vector.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_rollback.h b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_rollback.h index e91f95c9e..18fff6b10 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_rollback.h +++ b/mt-kahypar/partition/refinement/gains/steiner_tree/steiner_tree_rollback.h @@ -26,10 +26,7 @@ #pragma once -#include - #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.cpp b/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.cpp index 0d809762f..c8f8a60bd 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.cpp +++ b/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.cpp @@ -26,9 +26,9 @@ #include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h" -#include "tbb/parallel_for.h" -#include "tbb/enumerable_thread_specific.h" #include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" #include "mt-kahypar/definitions.h" diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h b/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h index 8e3e61782..f0a79ffe4 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h +++ b/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_cache_for_graphs.h @@ -26,23 +26,18 @@ #pragma once -#include - -#include "kahypar-resources/meta/policy_registry.h" - -#include "tbb/parallel_invoke.h" #include "tbb/concurrent_vector.h" +#include "tbb/parallel_invoke.h" -#include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/array.h" -#include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/datastructures/connectivity_set.h" #include "mt-kahypar/datastructures/delta_connectivity_set.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/datastructures/sparse_map.h" #include "mt-kahypar/macros.h" +#include "mt-kahypar/parallel/atomic_wrapper.h" +#include "mt-kahypar/partition/context_enum_classes.h" +#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/utils/range.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_computation_for_graphs.h b/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_computation_for_graphs.h index 0d5700ec6..f9a853da5 100644 --- a/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_computation_for_graphs.h +++ b/mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_gain_computation_for_graphs.h @@ -30,12 +30,12 @@ #include "tbb/enumerable_thread_specific.h" -#include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" -#include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_attributed_gains_for_graphs.h" -#include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/datastructures/sparse_map.h" +#include "mt-kahypar/datastructures/static_bitset.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" +#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/refinement/gains/gain_computation_base.h" +#include "mt-kahypar/partition/refinement/gains/steiner_tree_for_graphs/steiner_tree_attributed_gains_for_graphs.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/i_rebalancer.h b/mt-kahypar/partition/refinement/i_rebalancer.h index e700f5318..d372ca5c4 100644 --- a/mt-kahypar/partition/refinement/i_rebalancer.h +++ b/mt-kahypar/partition/refinement/i_rebalancer.h @@ -26,11 +26,8 @@ #pragma once -#include - #include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/i_refiner.h" diff --git a/mt-kahypar/partition/refinement/i_refiner.h b/mt-kahypar/partition/refinement/i_refiner.h index ba50b082c..0817580d3 100644 --- a/mt-kahypar/partition/refinement/i_refiner.h +++ b/mt-kahypar/partition/refinement/i_refiner.h @@ -26,11 +26,8 @@ #pragma once -#include - #include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/metrics.h" diff --git a/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.cpp b/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.cpp index ec32e79d7..b5565133e 100644 --- a/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.cpp +++ b/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.cpp @@ -29,13 +29,12 @@ #include "tbb/parallel_for.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" +#include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/randomize.h" -#include "mt-kahypar/utils/utilities.h" #include "mt-kahypar/utils/timer.h" -#include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/utils/utilities.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h b/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h index ab4657d54..a89d26849 100644 --- a/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h +++ b/mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h @@ -33,10 +33,9 @@ #include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/i_rebalancer.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" -#include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.cpp b/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.cpp index 0a04165c0..74605dc04 100644 --- a/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.cpp +++ b/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.cpp @@ -27,11 +27,10 @@ #include "mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h" #include -#include +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" #include "mt-kahypar/utils/cast.h" -#include "mt-kahypar/partition/context.h" #include "pcg_random.hpp" diff --git a/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h b/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h index e3c5daadc..e1171968b 100644 --- a/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h +++ b/mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h @@ -29,9 +29,8 @@ #include "mt-kahypar/datastructures/priority_queue.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/i_rebalancer.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.cpp b/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.cpp index 26285fd32..c59865767 100644 --- a/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.cpp +++ b/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.cpp @@ -27,17 +27,14 @@ #include "mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h" - #include - #include + #include "tbb/enumerable_thread_specific.h" #include "tbb/parallel_for.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/utils/timer.h" #include "mt-kahypar/utils/cast.h" namespace mt_kahypar { diff --git a/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h b/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h index 498e685e8..f58bcba2c 100644 --- a/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h +++ b/mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h @@ -31,12 +31,8 @@ #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" -#include "mt-kahypar/partition/refinement/i_rebalancer.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h" #include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" -#include "mt-kahypar/utils/cast.h" +#include "mt-kahypar/partition/refinement/i_rebalancer.h" namespace mt_kahypar { template diff --git a/mt-kahypar/partition/registries/register_coarsening_algorithms.cpp b/mt-kahypar/partition/registries/register_coarsening_algorithms.cpp index 9f7e93f07..8be900a6b 100644 --- a/mt-kahypar/partition/registries/register_coarsening_algorithms.cpp +++ b/mt-kahypar/partition/registries/register_coarsening_algorithms.cpp @@ -30,17 +30,16 @@ #include "kahypar-resources/meta/typelist.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h" +#include "mt-kahypar/partition/coarsening/multilevel_coarsener.h" #ifdef KAHYPAR_ENABLE_HIGHEST_QUALITY_FEATURES #include "mt-kahypar/partition/coarsening/nlevel_coarsener.h" #endif -#include "mt-kahypar/partition/coarsening/multilevel_coarsener.h" -#include "mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h" #include "mt-kahypar/partition/coarsening/policies/rating_acceptance_policy.h" #include "mt-kahypar/partition/coarsening/policies/rating_heavy_node_penalty_policy.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/factories.h" - namespace mt_kahypar { using MultilevelCoarsenerDispatcher = kahypar::meta::StaticMultiDispatchFactory > register_ ## policy_class( \ diff --git a/mt-kahypar/partition/registries/register_refinement_algorithms.cpp b/mt-kahypar/partition/registries/register_refinement_algorithms.cpp index 87eaa5e0e..84460a35f 100644 --- a/mt-kahypar/partition/registries/register_refinement_algorithms.cpp +++ b/mt-kahypar/partition/registries/register_refinement_algorithms.cpp @@ -32,18 +32,18 @@ #include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/factories.h" -#include "mt-kahypar/partition/refinement/do_nothing_refiner.h" -#include "mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h" #include "mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.h" +#include "mt-kahypar/partition/refinement/do_nothing_refiner.h" +#include "mt-kahypar/partition/refinement/flows/do_nothing_refiner.h" +#include "mt-kahypar/partition/refinement/flows/flow_refiner.h" +#include "mt-kahypar/partition/refinement/flows/scheduler.h" #include "mt-kahypar/partition/refinement/fm/multitry_kway_fm.h" #include "mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h" #include "mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h" -#include "mt-kahypar/partition/refinement/flows/do_nothing_refiner.h" -#include "mt-kahypar/partition/refinement/flows/scheduler.h" -#include "mt-kahypar/partition/refinement/flows/flow_refiner.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h" +#include "mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h" #include "mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h" +#include "mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h" namespace mt_kahypar { diff --git a/mt-kahypar/utils/cast.h b/mt-kahypar/utils/cast.h index 9c2d2b810..c59861eca 100644 --- a/mt-kahypar/utils/cast.h +++ b/mt-kahypar/utils/cast.h @@ -30,7 +30,6 @@ #include "include/libmtkahypartypes.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/utils/exception.h" namespace mt_kahypar::utils { diff --git a/mt-kahypar/utils/delete.h b/mt-kahypar/utils/delete.h index f17233107..1ac0b186d 100644 --- a/mt-kahypar/utils/delete.h +++ b/mt-kahypar/utils/delete.h @@ -26,16 +26,13 @@ #pragma once -#include - #include "include/libmtkahypartypes.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/macros.h" namespace mt_kahypar::utils { -void delete_hypergraph(mt_kahypar_hypergraph_t hg) { +inline void delete_hypergraph(mt_kahypar_hypergraph_t hg) { if ( hg.hypergraph ) { switch ( hg.type ) { case STATIC_GRAPH: delete reinterpret_cast(hg.hypergraph); break; @@ -47,7 +44,7 @@ void delete_hypergraph(mt_kahypar_hypergraph_t hg) { } } -void delete_partitioned_hypergraph(mt_kahypar_partitioned_hypergraph_t phg) { +inline void delete_partitioned_hypergraph(mt_kahypar_partitioned_hypergraph_t phg) { if ( phg.partitioned_hg ) { switch ( phg.type ) { case MULTILEVEL_GRAPH_PARTITIONING: delete reinterpret_cast(phg.partitioned_hg); break; diff --git a/mt-kahypar/utils/exception.h b/mt-kahypar/utils/exception.h index 781d03a09..23804ea27 100644 --- a/mt-kahypar/utils/exception.h +++ b/mt-kahypar/utils/exception.h @@ -30,8 +30,6 @@ #include #include -#include "mt-kahypar/macros.h" - namespace mt_kahypar { template diff --git a/mt-kahypar/utils/hash.h b/mt-kahypar/utils/hash.h index e484bcb78..8cbbb40b7 100644 --- a/mt-kahypar/utils/hash.h +++ b/mt-kahypar/utils/hash.h @@ -31,7 +31,6 @@ #include #include - namespace mt_kahypar::hashing { namespace integer { diff --git a/mt-kahypar/utils/memory_tree.cpp b/mt-kahypar/utils/memory_tree.cpp index cdc09cf5b..e41ac7d86 100644 --- a/mt-kahypar/utils/memory_tree.cpp +++ b/mt-kahypar/utils/memory_tree.cpp @@ -26,11 +26,11 @@ #include "mt-kahypar/utils/memory_tree.h" -#include "mt-kahypar/macros.h" - #include #include +#include "mt-kahypar/macros.h" + namespace mt_kahypar::utils { MemoryTreeNode::MemoryTreeNode(const std::string& name, const OutputType& output_type) : diff --git a/mt-kahypar/utils/memory_tree.h b/mt-kahypar/utils/memory_tree.h index 5791769ad..05e5aa772 100644 --- a/mt-kahypar/utils/memory_tree.h +++ b/mt-kahypar/utils/memory_tree.h @@ -27,8 +27,8 @@ #pragma once #include -#include #include +#include namespace mt_kahypar::utils { diff --git a/mt-kahypar/utils/progress_bar.h b/mt-kahypar/utils/progress_bar.h index 8a2db7e76..5bba4cacd 100644 --- a/mt-kahypar/utils/progress_bar.h +++ b/mt-kahypar/utils/progress_bar.h @@ -26,12 +26,12 @@ #pragma once +#include +#include #include +#include #include #include -#include -#include -#include #if defined(__linux__) or defined(__APPLE__) #include #elif _WIN32 diff --git a/mt-kahypar/utils/randomize.h b/mt-kahypar/utils/randomize.h index 60be2a50d..bb79b233e 100644 --- a/mt-kahypar/utils/randomize.h +++ b/mt-kahypar/utils/randomize.h @@ -32,13 +32,12 @@ #include #include -#include "tbb/task_group.h" #include "tbb/parallel_for.h" +#include "tbb/task_group.h" #include "mt-kahypar/macros.h" #include "mt-kahypar/parallel/stl/scalable_vector.h" - namespace mt_kahypar::utils { class Randomize { diff --git a/mt-kahypar/utils/range.h b/mt-kahypar/utils/range.h index f2cdc425e..6c567dd87 100644 --- a/mt-kahypar/utils/range.h +++ b/mt-kahypar/utils/range.h @@ -27,8 +27,8 @@ #pragma once -#include #include +#include template class IteratorRange { diff --git a/mt-kahypar/utils/reproducible_random.h b/mt-kahypar/utils/reproducible_random.h index 267572d0a..f2159bec8 100644 --- a/mt-kahypar/utils/reproducible_random.h +++ b/mt-kahypar/utils/reproducible_random.h @@ -31,7 +31,7 @@ #include #include "mt-kahypar/parallel/parallel_counting_sort.h" -#include "hash.h" +#include "mt-kahypar/utils/hash.h" namespace mt_kahypar::utils { diff --git a/mt-kahypar/utils/stats.h b/mt-kahypar/utils/stats.h index 43bc6905a..d4d6ef473 100644 --- a/mt-kahypar/utils/stats.h +++ b/mt-kahypar/utils/stats.h @@ -26,12 +26,10 @@ #pragma once +#include #include #include #include -#include - -#include "mt-kahypar/macros.h" namespace mt_kahypar { namespace utils { diff --git a/mt-kahypar/utils/timer.h b/mt-kahypar/utils/timer.h index 9d1f1ee44..0d6e9be7b 100644 --- a/mt-kahypar/utils/timer.h +++ b/mt-kahypar/utils/timer.h @@ -33,9 +33,7 @@ #include #include -#include - -#include "mt-kahypar/macros.h" +#include "tbb/enumerable_thread_specific.h" namespace mt_kahypar { namespace utils { diff --git a/mt-kahypar/utils/utilities.h b/mt-kahypar/utils/utilities.h index 508e5dfc4..bc8dce711 100644 --- a/mt-kahypar/utils/utilities.h +++ b/mt-kahypar/utils/utilities.h @@ -30,9 +30,8 @@ #include "tbb/concurrent_vector.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/utils/stats.h" #include "mt-kahypar/utils/initial_partitioning_stats.h" +#include "mt-kahypar/utils/stats.h" #include "mt-kahypar/utils/timer.h" namespace mt_kahypar { diff --git a/python/module.cpp b/python/module.cpp index 2eb431162..ffbde616d 100644 --- a/python/module.cpp +++ b/python/module.cpp @@ -24,27 +24,25 @@ * SOFTWARE. ******************************************************************************/ +#include #include #include -#include +#include #include "tbb/parallel_for.h" -#include -#include -#include - -#include "include/libmtkahypartypes.h" #include "include/helper_functions.h" +#include "include/libmtkahypartypes.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/io/hypergraph_factory.h" +#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/conversion.h" +#include "mt-kahypar/partition/mapping/target_graph.h" #include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/partitioner.h" -#include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/randomize.h" diff --git a/tests/datastructures/array_test.cc b/tests/datastructures/array_test.cc index a548c3f5c..d1593c2d1 100644 --- a/tests/datastructures/array_test.cc +++ b/tests/datastructures/array_test.cc @@ -24,15 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include -#include +#include "gtest/gtest.h" -#include "gmock/gmock.h" +#include +#include -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/datastructures/array.h" #include "mt-kahypar/parallel/hardware_topology.h" #include "mt-kahypar/parallel/tbb_initializer.h" + #include "tests/parallel/topology_mock.h" using ::testing::Test; diff --git a/tests/datastructures/connectivity_set_test.cc b/tests/datastructures/connectivity_set_test.cc index 79e539d52..72b59156c 100644 --- a/tests/datastructures/connectivity_set_test.cc +++ b/tests/datastructures/connectivity_set_test.cc @@ -24,10 +24,11 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" + #include #include -#include "gmock/gmock.h" #include "tbb/task_group.h" #include "mt-kahypar/datastructures/connectivity_set.h" diff --git a/tests/datastructures/contraction_tree_test.cc b/tests/datastructures/contraction_tree_test.cc index ac66786c4..c135d7943 100644 --- a/tests/datastructures/contraction_tree_test.cc +++ b/tests/datastructures/contraction_tree_test.cc @@ -24,7 +24,7 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/datastructures/contraction_tree.h" diff --git a/tests/datastructures/delta_partitioned_graph_test.cc b/tests/datastructures/delta_partitioned_graph_test.cc index e1933f39b..84c6676a8 100644 --- a/tests/datastructures/delta_partitioned_graph_test.cc +++ b/tests/datastructures/delta_partitioned_graph_test.cc @@ -24,17 +24,16 @@ * SOFTWARE. ******************************************************************************/ -#include +#include "gtest/gtest.h" -#include "gmock/gmock.h" - -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" +#include "mt-kahypar/datastructures/delta_partitioned_graph.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/partitioned_graph.h" -#include "mt-kahypar/datastructures/delta_partitioned_graph.h" +#include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" +#include "tests/datastructures/hypergraph_fixtures.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/datastructures/delta_partitioned_hypergraph_test.cc b/tests/datastructures/delta_partitioned_hypergraph_test.cc index 58e54c1f4..308dad4c6 100644 --- a/tests/datastructures/delta_partitioned_hypergraph_test.cc +++ b/tests/datastructures/delta_partitioned_hypergraph_test.cc @@ -24,17 +24,17 @@ * SOFTWARE. ******************************************************************************/ -#include -#include +#include "gtest/gtest.h" -#include "gmock/gmock.h" +#include -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/datastructures/delta_partitioned_hypergraph.h" +#include "mt-kahypar/datastructures/hypergraph_common.h" +#include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" +#include "tests/datastructures/hypergraph_fixtures.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/datastructures/dynamic_adjacency_array_test.cc b/tests/datastructures/dynamic_adjacency_array_test.cc index b842bfd96..0ce4031b4 100644 --- a/tests/datastructures/dynamic_adjacency_array_test.cc +++ b/tests/datastructures/dynamic_adjacency_array_test.cc @@ -24,11 +24,9 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" -#include +#include "gtest/gtest.h" #include "mt-kahypar/datastructures/dynamic_adjacency_array.h" -#include "mt-kahypar/parallel/atomic_wrapper.h" using ::testing::Test; diff --git a/tests/datastructures/dynamic_graph_test.cc b/tests/datastructures/dynamic_graph_test.cc index 870bcbb25..474566642 100644 --- a/tests/datastructures/dynamic_graph_test.cc +++ b/tests/datastructures/dynamic_graph_test.cc @@ -25,15 +25,14 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include -#include "mt-kahypar/definitions.h" -#include "tests/datastructures/hypergraph_fixtures.h" #include "mt-kahypar/datastructures/dynamic_graph.h" #include "mt-kahypar/datastructures/dynamic_graph_factory.h" -#include "mt-kahypar/utils/randomize.h" + +#include "tests/datastructures/hypergraph_fixtures.h" namespace mt_kahypar { namespace ds { diff --git a/tests/datastructures/dynamic_hypergraph_test.cc b/tests/datastructures/dynamic_hypergraph_test.cc index 64f790c42..325f61394 100644 --- a/tests/datastructures/dynamic_hypergraph_test.cc +++ b/tests/datastructures/dynamic_hypergraph_test.cc @@ -24,15 +24,14 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include -#include "mt-kahypar/definitions.h" -#include "tests/datastructures/hypergraph_fixtures.h" #include "mt-kahypar/datastructures/dynamic_hypergraph.h" #include "mt-kahypar/datastructures/dynamic_hypergraph_factory.h" -#include "mt-kahypar/utils/randomize.h" + +#include "tests/datastructures/hypergraph_fixtures.h" namespace mt_kahypar { namespace ds { diff --git a/tests/datastructures/dynamic_partitioned_hypergraph_test.cc b/tests/datastructures/dynamic_partitioned_hypergraph_test.cc index f388ab740..c8fb9a110 100644 --- a/tests/datastructures/dynamic_partitioned_hypergraph_test.cc +++ b/tests/datastructures/dynamic_partitioned_hypergraph_test.cc @@ -24,12 +24,11 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" #include #include -#include "gmock/gmock.h" - #include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" diff --git a/tests/datastructures/fixed_vertex_support_test.cc b/tests/datastructures/fixed_vertex_support_test.cc index fa9a60ed1..56c8fb33c 100644 --- a/tests/datastructures/fixed_vertex_support_test.cc +++ b/tests/datastructures/fixed_vertex_support_test.cc @@ -24,14 +24,13 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" - -#include "gmock/gmock.h" #include "tbb/task_group.h" +#include "mt-kahypar/datastructures/fixed_vertex_support.h" #include "mt-kahypar/datastructures/static_hypergraph.h" #include "mt-kahypar/datastructures/static_hypergraph_factory.h" -#include "mt-kahypar/datastructures/fixed_vertex_support.h" using ::testing::Test; diff --git a/tests/datastructures/gain_updates_test.cc b/tests/datastructures/gain_updates_test.cc index adeab3a0b..487727852 100644 --- a/tests/datastructures/gain_updates_test.cc +++ b/tests/datastructures/gain_updates_test.cc @@ -24,17 +24,13 @@ * SOFTWARE. ******************************************************************************/ -#include -#include +#include "gtest/gtest.h" -#include "gmock/gmock.h" - -#include "mt-kahypar/macros.h" - -#include "tests/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" +#include "tests/definitions.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/datastructures/graph_test.cc b/tests/datastructures/graph_test.cc index 41949bf4c..55a26812b 100644 --- a/tests/datastructures/graph_test.cc +++ b/tests/datastructures/graph_test.cc @@ -24,12 +24,12 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/datastructures/graph.h" +#include "tests/datastructures/hypergraph_fixtures.h" + using ::testing::Test; namespace mt_kahypar::ds { diff --git a/tests/datastructures/hypergraph_fixtures.h b/tests/datastructures/hypergraph_fixtures.h index cfc8e6cfb..d9fd97bf6 100644 --- a/tests/datastructures/hypergraph_fixtures.h +++ b/tests/datastructures/hypergraph_fixtures.h @@ -31,6 +31,7 @@ #include "mt-kahypar/definitions.h" #include "mt-kahypar/parallel/hardware_topology.h" #include "mt-kahypar/parallel/tbb_initializer.h" + #include "tests/parallel/topology_mock.h" using ::testing::Test; diff --git a/tests/datastructures/incident_net_array_test.cc b/tests/datastructures/incident_net_array_test.cc index 6a7a0a75c..ad2b528e9 100644 --- a/tests/datastructures/incident_net_array_test.cc +++ b/tests/datastructures/incident_net_array_test.cc @@ -24,7 +24,7 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include #include "mt-kahypar/datastructures/incident_net_array.h" diff --git a/tests/datastructures/nlevel_smoke_test.cc b/tests/datastructures/nlevel_smoke_test.cc index 2ef28cab0..8994c768d 100644 --- a/tests/datastructures/nlevel_smoke_test.cc +++ b/tests/datastructures/nlevel_smoke_test.cc @@ -23,15 +23,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" -#include +#include "gtest/gtest.h" + #include -#include "mt-kahypar/definitions.h" #include "mt-kahypar/datastructures/fixed_vertex_support.h" -#include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" -#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/definitions.h" +#include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" #include "mt-kahypar/utils/randomize.h" namespace mt_kahypar { diff --git a/tests/datastructures/partitioned_graph_test.cc b/tests/datastructures/partitioned_graph_test.cc index 1338812c7..aa72921f6 100644 --- a/tests/datastructures/partitioned_graph_test.cc +++ b/tests/datastructures/partitioned_graph_test.cc @@ -25,18 +25,14 @@ * SOFTWARE. ******************************************************************************/ -#include +#include "gtest/gtest.h" -#include "gmock/gmock.h" +#include +#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" +#include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" #include "tests/definitions.h" -#include "mt-kahypar/datastructures/static_graph.h" -#include "mt-kahypar/datastructures/static_graph_factory.h" -#include "mt-kahypar/datastructures/partitioned_graph.h" -#include "mt-kahypar/partition/refinement/gains/cut_for_graphs/cut_gain_cache_for_graphs.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" -#include "mt-kahypar/partition/metrics.h" using ::testing::Test; diff --git a/tests/datastructures/partitioned_hypergraph_smoke_test.cc b/tests/datastructures/partitioned_hypergraph_smoke_test.cc index 085ed134c..0e607f471 100644 --- a/tests/datastructures/partitioned_hypergraph_smoke_test.cc +++ b/tests/datastructures/partitioned_hypergraph_smoke_test.cc @@ -24,10 +24,9 @@ * SOFTWARE. ******************************************************************************/ -#include "tests/datastructures/hypergraph_fixtures.h" +#include "gtest/gtest.h" #include -#include "gmock/gmock.h" #include "tbb/blocked_range.h" #include "tbb/enumerable_thread_specific.h" @@ -36,11 +35,13 @@ #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_attributed_gains.h" -#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" #include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/partition/refinement/gains/cut/cut_attributed_gains.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_attributed_gains.h" #include "mt-kahypar/utils/randomize.h" +#include "tests/datastructures/hypergraph_fixtures.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/datastructures/partitioned_hypergraph_test.cc b/tests/datastructures/partitioned_hypergraph_test.cc index 828438f14..9918830b0 100644 --- a/tests/datastructures/partitioned_hypergraph_test.cc +++ b/tests/datastructures/partitioned_hypergraph_test.cc @@ -24,13 +24,11 @@ * SOFTWARE. ******************************************************************************/ - +#include "gtest/gtest.h" #include #include -#include "gmock/gmock.h" - #include "tests/definitions.h" using ::testing::Test; diff --git a/tests/datastructures/pin_count_in_part_test.cc b/tests/datastructures/pin_count_in_part_test.cc index b14715513..806e6f7cd 100644 --- a/tests/datastructures/pin_count_in_part_test.cc +++ b/tests/datastructures/pin_count_in_part_test.cc @@ -24,12 +24,12 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" #include #include #include -#include "gmock/gmock.h" #include "tbb/task_group.h" #include "mt-kahypar/datastructures/pin_count_in_part.h" diff --git a/tests/datastructures/priority_queue_test.cc b/tests/datastructures/priority_queue_test.cc index 1e96e590d..28e8939b8 100644 --- a/tests/datastructures/priority_queue_test.cc +++ b/tests/datastructures/priority_queue_test.cc @@ -24,17 +24,13 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" #include #include -#include "gmock/gmock.h" - -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/priority_queue.h" - - using ::testing::Test; namespace mt_kahypar { diff --git a/tests/datastructures/sparse_map_test.cc b/tests/datastructures/sparse_map_test.cc index ed431cf6a..58759e2f4 100644 --- a/tests/datastructures/sparse_map_test.cc +++ b/tests/datastructures/sparse_map_test.cc @@ -24,16 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include +#include "gtest/gtest.h" + #include #include -#include "gmock/gmock.h" -#include "tbb/task_group.h" #include "tbb/parallel_invoke.h" +#include "tbb/task_group.h" #include "mt-kahypar/datastructures/sparse_map.h" -#include "mt-kahypar/datastructures/concurrent_flat_map.h" using ::testing::Test; diff --git a/tests/datastructures/static_bitset_test.cc b/tests/datastructures/static_bitset_test.cc index c127cbd46..2362d539b 100644 --- a/tests/datastructures/static_bitset_test.cc +++ b/tests/datastructures/static_bitset_test.cc @@ -24,13 +24,10 @@ * SOFTWARE. ******************************************************************************/ -#include -#include +#include "gtest/gtest.h" -#include "gmock/gmock.h" - -#include "mt-kahypar/parallel/stl/scalable_vector.h" #include "mt-kahypar/datastructures/static_bitset.h" +#include "mt-kahypar/parallel/stl/scalable_vector.h" using ::testing::Test; diff --git a/tests/datastructures/static_graph_test.cc b/tests/datastructures/static_graph_test.cc index fa891fbbc..59bce61c3 100644 --- a/tests/datastructures/static_graph_test.cc +++ b/tests/datastructures/static_graph_test.cc @@ -25,13 +25,11 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" -#include "gmock/gmock.h" +#include "mt-kahypar/datastructures/static_graph.h" #include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/datastructures/static_graph.h" -#include "mt-kahypar/datastructures/static_graph_factory.h" using ::testing::Test; diff --git a/tests/datastructures/static_hypergraph_test.cc b/tests/datastructures/static_hypergraph_test.cc index fff3e53ff..ab0be1812 100644 --- a/tests/datastructures/static_hypergraph_test.cc +++ b/tests/datastructures/static_hypergraph_test.cc @@ -24,12 +24,11 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/datastructures/static_hypergraph_factory.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; diff --git a/tests/definitions.h b/tests/definitions.h index c4c42d70d..220fad1f2 100644 --- a/tests/definitions.h +++ b/tests/definitions.h @@ -26,7 +26,7 @@ #pragma once -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" diff --git a/tests/interface/interface_test.cc b/tests/interface/interface_test.cc index d2b0c9e74..51b761900 100644 --- a/tests/interface/interface_test.cc +++ b/tests/interface/interface_test.cc @@ -25,16 +25,18 @@ ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include +#include + #include "tbb/parallel_invoke.h" -#include "libmtkahypar.h" -#include "mt-kahypar/macros.h" -#include "mt-kahypar/partition/context.h" +#include "kahypar-resources/macros.h" + #include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/partition/context.h" using ::testing::Test; diff --git a/tests/io/hypergraph_io_test.cc b/tests/io/hypergraph_io_test.cc index ab0d4a2ce..493d317cb 100644 --- a/tests/io/hypergraph_io_test.cc +++ b/tests/io/hypergraph_io_test.cc @@ -24,12 +24,13 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context_enum_classes.h" +#include "tests/definitions.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/io/sql_plottools_serializer_test.cc b/tests/io/sql_plottools_serializer_test.cc index 9985b7f0d..dcf5d5823 100644 --- a/tests/io/sql_plottools_serializer_test.cc +++ b/tests/io/sql_plottools_serializer_test.cc @@ -26,15 +26,16 @@ #include "gtest/gtest.h" -#include -#include -#include #include #include +#include +#include +#include -#include "tests/definitions.h" -#include "mt-kahypar/io/sql_plottools_serializer.h" #include "mt-kahypar/io/csv_output.h" +#include "mt-kahypar/io/sql_plottools_serializer.h" + +#include "tests/definitions.h" using ::testing::Test; diff --git a/tests/parallel/memory_pool_test.cc b/tests/parallel/memory_pool_test.cc index 97e3f64fb..afd9b0199 100644 --- a/tests/parallel/memory_pool_test.cc +++ b/tests/parallel/memory_pool_test.cc @@ -24,14 +24,16 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" + #include -#include "gmock/gmock.h" #include "tbb/task_group.h" -#include "mt-kahypar/parallel/memory_pool.h" #include "mt-kahypar/parallel/hardware_topology.h" +#include "mt-kahypar/parallel/memory_pool.h" #include "mt-kahypar/parallel/tbb_initializer.h" + #include "tests/parallel/topology_mock.h" using ::testing::Test; diff --git a/tests/parallel/prefix_sum_test.cc b/tests/parallel/prefix_sum_test.cc index e9ea840d4..02d32f3e0 100644 --- a/tests/parallel/prefix_sum_test.cc +++ b/tests/parallel/prefix_sum_test.cc @@ -24,12 +24,12 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "mt-kahypar/parallel/parallel_prefix_sum.h" - -#include #include +#include + +#include "mt-kahypar/parallel/parallel_prefix_sum.h" using ::testing::Test; diff --git a/tests/parallel/topology_mock.h b/tests/parallel/topology_mock.h index 3e1ec4e34..860f034bc 100644 --- a/tests/parallel/topology_mock.h +++ b/tests/parallel/topology_mock.h @@ -28,12 +28,9 @@ #include #include -#include -#include #include #include "mt-kahypar/parallel/hardware_topology.h" -#include "mt-kahypar/macros.h" namespace mt_kahypar { namespace parallel { diff --git a/tests/parallel/work_container_test.cc b/tests/parallel/work_container_test.cc index d685181d4..74e2e8547 100644 --- a/tests/parallel/work_container_test.cc +++ b/tests/parallel/work_container_test.cc @@ -24,11 +24,12 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include #include +#include "mt-kahypar/parallel/work_stack.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/partition/coarsening/coarsener_fixtures.h b/tests/partition/coarsening/coarsener_fixtures.h index 2681a06f6..5647c7c75 100644 --- a/tests/partition/coarsening/coarsener_fixtures.h +++ b/tests/partition/coarsening/coarsener_fixtures.h @@ -28,14 +28,14 @@ #include "kahypar-resources/datastructure/fast_reset_flag_array.h" -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/cast.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/i_refiner.h" #include "mt-kahypar/partition/coarsening/coarsening_commons.h" #include "mt-kahypar/partition/coarsening/policies/rating_heavy_node_penalty_policy.h" #include "mt-kahypar/partition/coarsening/policies/rating_score_policy.h" +#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/refinement/i_refiner.h" +#include "mt-kahypar/utils/cast.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; using ::testing::Eq; diff --git a/tests/partition/coarsening/coarsener_test.cc b/tests/partition/coarsening/coarsener_test.cc index 58a08c765..900f0109a 100644 --- a/tests/partition/coarsening/coarsener_test.cc +++ b/tests/partition/coarsening/coarsener_test.cc @@ -24,10 +24,8 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/definitions.h" -#include "tests/partition/coarsening/coarsener_fixtures.h" #include "mt-kahypar/partition/coarsening/multilevel_coarsener.h" #include "mt-kahypar/partition/coarsening/multilevel_uncoarsener.h" #ifdef KAHYPAR_ENABLE_HIGHEST_QUALITY_FEATURES @@ -35,6 +33,7 @@ #include "mt-kahypar/partition/coarsening/nlevel_uncoarsener.h" #endif +#include "tests/partition/coarsening/coarsener_fixtures.h" using ::testing::Test; diff --git a/tests/partition/determinism/determinism_test.cc b/tests/partition/determinism/determinism_test.cc index 63e423855..1a1daa3f1 100644 --- a/tests/partition/determinism/determinism_test.cc +++ b/tests/partition/determinism/determinism_test.cc @@ -24,17 +24,16 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/io/hypergraph_factory.h" - -#include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" #include "mt-kahypar/partition/coarsening/deterministic_multilevel_coarsener.h" +#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" +#include "mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h" #include "mt-kahypar/partition/refinement/deterministic/deterministic_label_propagation.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h" #include "mt-kahypar/utils/cast.h" using ::testing::Test; diff --git a/tests/partition/initial_partitioning/flat_initial_partitioner_test.cc b/tests/partition/initial_partitioning/flat_initial_partitioner_test.cc index 7d8c29358..f4d780b73 100644 --- a/tests/partition/initial_partitioning/flat_initial_partitioner_test.cc +++ b/tests/partition/initial_partitioning/flat_initial_partitioner_test.cc @@ -24,23 +24,22 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" - -#include +#include "gtest/gtest.h" #include "tbb/parallel_invoke.h" -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/utils/utilities.h" -#include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/datastructures/fixed_vertex_support.h" -#include "mt-kahypar/partition/initial_partitioning/random_initial_partitioner.h" +#include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" #include "mt-kahypar/partition/initial_partitioning/greedy_initial_partitioner.h" #include "mt-kahypar/partition/initial_partitioning/label_propagation_initial_partitioner.h" #include "mt-kahypar/partition/initial_partitioning/policies/gain_computation_policy.h" #include "mt-kahypar/partition/initial_partitioning/policies/pq_selection_policy.h" +#include "mt-kahypar/partition/initial_partitioning/random_initial_partitioner.h" #include "mt-kahypar/utils/randomize.h" +#include "mt-kahypar/utils/utilities.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; diff --git a/tests/partition/initial_partitioning/initial_partitioner_test.cc b/tests/partition/initial_partitioning/initial_partitioner_test.cc index 21873b270..5ecb2bd0e 100644 --- a/tests/partition/initial_partitioning/initial_partitioner_test.cc +++ b/tests/partition/initial_partitioning/initial_partitioner_test.cc @@ -24,15 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "mt-kahypar/io/command_line_options.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/io/command_line_options.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/recursive_bipartitioning.h" #include "mt-kahypar/partition/deep_multilevel.h" +#include "mt-kahypar/partition/recursive_bipartitioning.h" using ::testing::Test; diff --git a/tests/partition/initial_partitioning/initial_partitioning_data_container_test.cc b/tests/partition/initial_partitioning/initial_partitioning_data_container_test.cc index 1ee896067..443ccf780 100644 --- a/tests/partition/initial_partitioning/initial_partitioning_data_container_test.cc +++ b/tests/partition/initial_partitioning/initial_partitioning_data_container_test.cc @@ -24,16 +24,17 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include #include "tbb/parallel_invoke.h" -#include "tests/datastructures/hypergraph_fixtures.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/utilities.h" #include "mt-kahypar/partition/initial_partitioning/initial_partitioning_data_container.h" +#include "mt-kahypar/utils/utilities.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; diff --git a/tests/partition/initial_partitioning/pool_initial_partitioner_test.cc b/tests/partition/initial_partitioning/pool_initial_partitioner_test.cc index f3497535e..4acc1b887 100644 --- a/tests/partition/initial_partitioning/pool_initial_partitioner_test.cc +++ b/tests/partition/initial_partitioning/pool_initial_partitioner_test.cc @@ -24,17 +24,16 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" - -#include +#include "gtest/gtest.h" #include "tbb/parallel_invoke.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/utils/utilities.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/initial_partitioning/pool_initial_partitioner.h" #include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/utils/randomize.h" +#include "mt-kahypar/utils/utilities.h" using ::testing::Test; diff --git a/tests/partition/mapping/set_enumerator_test.cc b/tests/partition/mapping/set_enumerator_test.cc index 6f9d81091..3677400c7 100644 --- a/tests/partition/mapping/set_enumerator_test.cc +++ b/tests/partition/mapping/set_enumerator_test.cc @@ -24,7 +24,7 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/partition/mapping/set_enumerator.h" diff --git a/tests/partition/mapping/target_graph_test.cc b/tests/partition/mapping/target_graph_test.cc index 27b0b76b3..4adbd7455 100644 --- a/tests/partition/mapping/target_graph_test.cc +++ b/tests/partition/mapping/target_graph_test.cc @@ -24,7 +24,7 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "tbb/task_group.h" diff --git a/tests/partition/preprocessing/louvain_test.cc b/tests/partition/preprocessing/louvain_test.cc index aa07ab06f..4771d6a1c 100644 --- a/tests/partition/preprocessing/louvain_test.cc +++ b/tests/partition/preprocessing/louvain_test.cc @@ -24,14 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/datastructures/hypergraph_fixtures.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/datastructures/graph.h" +#include "mt-kahypar/definitions.h" +#include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/preprocessing/community_detection/parallel_louvain.h" -#include "mt-kahypar/io/hypergraph_factory.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; diff --git a/tests/partition/refinement/advanced_rebalancer_test.cc b/tests/partition/refinement/advanced_rebalancer_test.cc index ba9ba2d85..d915f5c12 100644 --- a/tests/partition/refinement/advanced_rebalancer_test.cc +++ b/tests/partition/refinement/advanced_rebalancer_test.cc @@ -24,16 +24,13 @@ * SOFTWARE. ******************************************************************************/ -#include -#include - - -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" +#include "mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h" +#include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/randomize.h" using ::testing::Test; diff --git a/tests/partition/refinement/bipartitioning_gain_policy_test.cc b/tests/partition/refinement/bipartitioning_gain_policy_test.cc index 7c9690b0f..ef17f1e68 100644 --- a/tests/partition/refinement/bipartitioning_gain_policy_test.cc +++ b/tests/partition/refinement/bipartitioning_gain_policy_test.cc @@ -24,14 +24,14 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" +#include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/context_enum_classes.h" -#include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/partition/refinement/gains/bipartitioning_policy.h" #include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" +#include "mt-kahypar/partition/refinement/gains/bipartitioning_policy.h" using ::testing::Test; diff --git a/tests/partition/refinement/flow_construction_test.cc b/tests/partition/refinement/flow_construction_test.cc index 6b3df42c7..366bd4cdc 100644 --- a/tests/partition/refinement/flow_construction_test.cc +++ b/tests/partition/refinement/flow_construction_test.cc @@ -24,13 +24,12 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/io/hypergraph_io.h" -#include "mt-kahypar/partition/refinement/flows/sequential_construction.h" #include "mt-kahypar/partition/refinement/flows/parallel_construction.h" +#include "mt-kahypar/partition/refinement/flows/sequential_construction.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" using ::testing::Test; diff --git a/tests/partition/refinement/flow_refiner_mock.h b/tests/partition/refinement/flow_refiner_mock.h index 95c7ad14b..cfd9cbe4b 100644 --- a/tests/partition/refinement/flow_refiner_mock.h +++ b/tests/partition/refinement/flow_refiner_mock.h @@ -26,13 +26,12 @@ #pragma once - #include "kahypar-resources/meta/registrar.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/factories.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/context_enum_classes.h" +#include "mt-kahypar/partition/factories.h" #include "mt-kahypar/partition/refinement/flows/i_flow_refiner.h" #include "mt-kahypar/utils/cast.h" diff --git a/tests/partition/refinement/fm_strategy_test.cc b/tests/partition/refinement/fm_strategy_test.cc index 6ab88ad0d..815067e98 100644 --- a/tests/partition/refinement/fm_strategy_test.cc +++ b/tests/partition/refinement/fm_strategy_test.cc @@ -24,13 +24,14 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" + #include -#include "gmock/gmock.h" +#include "mt-kahypar/datastructures/priority_queue.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" - -#include "mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h" +#include "mt-kahypar/partition/refinement/fm/fm_commons.h" #include "mt-kahypar/partition/refinement/fm/strategies/unconstrained_strategy.h" #include "mt-kahypar/partition/refinement/gains/km1/km1_gain_cache.h" diff --git a/tests/partition/refinement/gain_cache_test.cc b/tests/partition/refinement/gain_cache_test.cc index 915e9a205..2f278dc6d 100644 --- a/tests/partition/refinement/gain_cache_test.cc +++ b/tests/partition/refinement/gain_cache_test.cc @@ -24,19 +24,19 @@ * SOFTWARE. ******************************************************************************/ +#include "gtest/gtest.h" + #include -#include "gmock/gmock.h" -#include "tbb/parallel_for.h" #include "tbb/enumerable_thread_specific.h" +#include "tbb/parallel_for.h" -#include "mt-kahypar/definitions.h" #include "mt-kahypar/datastructures/static_graph_factory.h" #include "mt-kahypar/datastructures/thread_safe_fast_reset_flag_array.h" +#include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/partition/mapping/target_graph.h" -#include "mt-kahypar/partition/refinement/gains/gain_cache_ptr.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" #include "mt-kahypar/utils/randomize.h" diff --git a/tests/partition/refinement/gain_policy_test.cc b/tests/partition/refinement/gain_policy_test.cc index 248214740..6d3cddda7 100644 --- a/tests/partition/refinement/gain_policy_test.cc +++ b/tests/partition/refinement/gain_policy_test.cc @@ -24,12 +24,13 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/datastructures/hypergraph_fixtures.h" #include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" #include "mt-kahypar/partition/refinement/gains/cut/cut_gain_computation.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; diff --git a/tests/partition/refinement/label_propagation_refiner_test.cc b/tests/partition/refinement/label_propagation_refiner_test.cc index f525248dd..386802961 100644 --- a/tests/partition/refinement/label_propagation_refiner_test.cc +++ b/tests/partition/refinement/label_propagation_refiner_test.cc @@ -24,18 +24,19 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/datastructures/hypergraph_fixtures.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" -#include "mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" +#include "mt-kahypar/partition/refinement/label_propagation/label_propagation_refiner.h" #include "mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h" #include "mt-kahypar/utils/cast.h" +#include "tests/datastructures/hypergraph_fixtures.h" + using ::testing::Test; namespace mt_kahypar { diff --git a/tests/partition/refinement/multitry_fm_test.cc b/tests/partition/refinement/multitry_fm_test.cc index 791b0901f..c831c104d 100644 --- a/tests/partition/refinement/multitry_fm_test.cc +++ b/tests/partition/refinement/multitry_fm_test.cc @@ -24,16 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/io/hypergraph_factory.h" +#include "mt-kahypar/partition/context.h" +#include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" #include "mt-kahypar/partition/refinement/fm/fm_commons.h" #include "mt-kahypar/partition/refinement/fm/multitry_kway_fm.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h" -#include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" #include "mt-kahypar/partition/refinement/rebalancing/advanced_rebalancer.h" using ::testing::Test; diff --git a/tests/partition/refinement/problem_construction_test.cc b/tests/partition/refinement/problem_construction_test.cc index 6ec70a6fc..7edacfda0 100644 --- a/tests/partition/refinement/problem_construction_test.cc +++ b/tests/partition/refinement/problem_construction_test.cc @@ -24,12 +24,13 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/partition/refinement/flows/problem_construction.h" + #include "tests/partition/refinement/flow_refiner_mock.h" using ::testing::Test; diff --git a/tests/partition/refinement/quotient_graph_test.cc b/tests/partition/refinement/quotient_graph_test.cc index 8ab50ec71..55e86d91e 100644 --- a/tests/partition/refinement/quotient_graph_test.cc +++ b/tests/partition/refinement/quotient_graph_test.cc @@ -24,11 +24,11 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "mt-kahypar/io/hypergraph_io.h" +/*#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/partition/refinement/flows/quotient_graph.h" -#include "tests/partition/refinement/flow_refiner_mock.h" +#include "tests/partition/refinement/flow_refiner_mock.h"*/ using ::testing::Test; diff --git a/tests/partition/refinement/rebalance_test.cc b/tests/partition/refinement/rebalance_test.cc index 7a133c7bb..3ddfce30c 100644 --- a/tests/partition/refinement/rebalance_test.cc +++ b/tests/partition/refinement/rebalance_test.cc @@ -24,16 +24,12 @@ * SOFTWARE. ******************************************************************************/ -#include -#include - - -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" +#include "mt-kahypar/partition/refinement/rebalancing/simple_rebalancer.h" using ::testing::Test; diff --git a/tests/partition/refinement/refinement_adapter_test.cc b/tests/partition/refinement/refinement_adapter_test.cc index f943d42c7..a6af9390c 100644 --- a/tests/partition/refinement/refinement_adapter_test.cc +++ b/tests/partition/refinement/refinement_adapter_test.cc @@ -24,12 +24,13 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" -#include "tests/partition/refinement/flow_refiner_mock.h" #include "mt-kahypar/partition/refinement/flows/refiner_adapter.h" +#include "tests/partition/refinement/flow_refiner_mock.h" + using ::testing::Test; #define MOVE(HN, FROM, TO) Move { FROM, TO, HN, 0 } diff --git a/tests/partition/refinement/rollback_test.cc b/tests/partition/refinement/rollback_test.cc index 9c5f149ca..104c00160 100644 --- a/tests/partition/refinement/rollback_test.cc +++ b/tests/partition/refinement/rollback_test.cc @@ -24,22 +24,14 @@ * SOFTWARE. ******************************************************************************/ -#include -#include - -#include "gmock/gmock.h" - -#include "mt-kahypar/macros.h" - +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" - +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/partition/refinement/fm/global_rollback.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" -#include "mt-kahypar/partition/metrics.h" - using ::testing::Test; namespace mt_kahypar { diff --git a/tests/partition/refinement/scheduler_test.cc b/tests/partition/refinement/scheduler_test.cc index 1370b4bfb..e7b33cb7d 100644 --- a/tests/partition/refinement/scheduler_test.cc +++ b/tests/partition/refinement/scheduler_test.cc @@ -24,14 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/partition/refinement/flows/scheduler.h" -#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" #include "mt-kahypar/partition/refinement/gains/gain_definitions.h" +#include "mt-kahypar/partition/refinement/gains/km1/km1_gain_computation.h" + #include "tests/partition/refinement/flow_refiner_mock.h" using ::testing::Test; diff --git a/tests/partition/refinement/twoway_fm_refiner_test.cc b/tests/partition/refinement/twoway_fm_refiner_test.cc index 6d3c95c07..4e91ae0c8 100644 --- a/tests/partition/refinement/twoway_fm_refiner_test.cc +++ b/tests/partition/refinement/twoway_fm_refiner_test.cc @@ -24,15 +24,15 @@ * SOFTWARE. ******************************************************************************/ -#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "tests/datastructures/hypergraph_fixtures.h" #include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/initial_partitioning/bfs_initial_partitioner.h" #include "mt-kahypar/partition/refinement/fm/sequential_twoway_fm_refiner.h" -#include "mt-kahypar/utils/randomize.h" + +#include "tests/datastructures/hypergraph_fixtures.h" using ::testing::Test; diff --git a/tools/bench_deterministic_shuffling.cpp b/tools/bench_deterministic_shuffling.cpp index f391b7c41..b04a47508 100644 --- a/tools/bench_deterministic_shuffling.cpp +++ b/tools/bench_deterministic_shuffling.cpp @@ -1,8 +1,9 @@ -#include "mt-kahypar/utils/reproducible_random.h" - #include #include -#include + +#include "tbb/global_control.h" + +#include "mt-kahypar/utils/reproducible_random.h" namespace mt_kahypar::utils { diff --git a/tools/evaluate_bipart_partition.cc b/tools/evaluate_bipart_partition.cc index 76ca389d7..d77cbbae0 100644 --- a/tools/evaluate_bipart_partition.cc +++ b/tools/evaluate_bipart_partition.cc @@ -25,20 +25,17 @@ ******************************************************************************/ #include - #include #include #include #include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/datastructures/partitioned_hypergraph.h" #include "mt-kahypar/datastructures/connectivity_info.h" +#include "mt-kahypar/datastructures/partitioned_hypergraph.h" +#include "mt-kahypar/datastructures/static_hypergraph.h" +#include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" diff --git a/tools/evaluate_hmetis_partition.cc b/tools/evaluate_hmetis_partition.cc index c9f815b9d..a413c49e1 100644 --- a/tools/evaluate_hmetis_partition.cc +++ b/tools/evaluate_hmetis_partition.cc @@ -25,20 +25,16 @@ ******************************************************************************/ #include - #include #include -#include #include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/datastructures/partitioned_hypergraph.h" #include "mt-kahypar/datastructures/connectivity_info.h" +#include "mt-kahypar/datastructures/partitioned_hypergraph.h" +#include "mt-kahypar/datastructures/static_hypergraph.h" +#include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/metrics.h" -#include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" diff --git a/tools/fixed_vertex_file_generator.cc b/tools/fixed_vertex_file_generator.cc index 9547d628c..bd9ff7fab 100644 --- a/tools/fixed_vertex_file_generator.cc +++ b/tools/fixed_vertex_file_generator.cc @@ -25,14 +25,13 @@ ******************************************************************************/ #include - #include #include #include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/macros.h" #include "mt-kahypar/utils/randomize.h" namespace po = boost::program_options; diff --git a/tools/graph_to_hgr.cc b/tools/graph_to_hgr.cc index d53274227..41c610abb 100644 --- a/tools/graph_to_hgr.cc +++ b/tools/graph_to_hgr.cc @@ -25,14 +25,12 @@ ******************************************************************************/ #include - #include #include #include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/io/hypergraph_factory.h" +#include "kahypar-resources/macros.h" + #include "mt-kahypar/io/hypergraph_io.h" using namespace mt_kahypar; diff --git a/tools/grid_graph_generator.cc b/tools/grid_graph_generator.cc index 6b3a64683..c4b7439dd 100644 --- a/tools/grid_graph_generator.cc +++ b/tools/grid_graph_generator.cc @@ -25,15 +25,14 @@ ******************************************************************************/ #include - #include -#include #include +#include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/hypergraph_common.h" #include "mt-kahypar/utils/randomize.h" + using namespace mt_kahypar; namespace po = boost::program_options; diff --git a/tools/hgr_to_graph.cc b/tools/hgr_to_graph.cc index fd887539e..f9c0657b0 100644 --- a/tools/hgr_to_graph.cc +++ b/tools/hgr_to_graph.cc @@ -24,16 +24,14 @@ * SOFTWARE. ******************************************************************************/ +#include #include - #include #include #include -#include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/io/hypergraph_factory.h" +#include "kahypar-resources/macros.h" + #include "mt-kahypar/io/hypergraph_io.h" using namespace mt_kahypar; diff --git a/tools/hgr_to_parkway_converter.cc b/tools/hgr_to_parkway_converter.cc index 9ed3ba8a5..a9651c452 100644 --- a/tools/hgr_to_parkway_converter.cc +++ b/tools/hgr_to_parkway_converter.cc @@ -25,16 +25,11 @@ ******************************************************************************/ #include - #include -#include #include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" diff --git a/tools/hgr_to_zoltan_converter.cc b/tools/hgr_to_zoltan_converter.cc index 0d6d1f4ea..9ac72700b 100644 --- a/tools/hgr_to_zoltan_converter.cc +++ b/tools/hgr_to_zoltan_converter.cc @@ -25,16 +25,12 @@ ******************************************************************************/ #include - #include #include #include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" diff --git a/tools/hierarchical_process_graph_generator.cc b/tools/hierarchical_process_graph_generator.cc index 490495c2e..65cc6d4f8 100644 --- a/tools/hierarchical_process_graph_generator.cc +++ b/tools/hierarchical_process_graph_generator.cc @@ -25,15 +25,11 @@ ******************************************************************************/ #include - #include #include #include -#include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/hypergraph_common.h" -#include "mt-kahypar/utils/randomize.h" using namespace mt_kahypar; namespace po = boost::program_options; diff --git a/tools/hypergraph_stats.cc b/tools/hypergraph_stats.cc index 827995314..edb0836d0 100644 --- a/tools/hypergraph_stats.cc +++ b/tools/hypergraph_stats.cc @@ -25,27 +25,22 @@ ******************************************************************************/ #include - -#include #include -#include #include -#include "tbb/parallel_sort.h" #include "tbb/enumerable_thread_specific.h" #include "tbb/parallel_reduce.h" +#include "tbb/parallel_sort.h" + +#include "kahypar-resources/utils/math.h" -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" #include "mt-kahypar/utils/hypergraph_statistics.h" -#include "kahypar-resources/utils/math.h" - using namespace mt_kahypar; namespace po = boost::program_options; diff --git a/tools/metis_to_scotch_converter.cc b/tools/metis_to_scotch_converter.cc index 290fc4163..d2214eafa 100644 --- a/tools/metis_to_scotch_converter.cc +++ b/tools/metis_to_scotch_converter.cc @@ -25,16 +25,12 @@ ******************************************************************************/ #include - #include #include #include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/static_graph.h" -#include "mt-kahypar/partition/context.h" #include "mt-kahypar/io/hypergraph_factory.h" -#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" diff --git a/tools/mtx_to_graph.cc b/tools/mtx_to_graph.cc index 3f39972f3..93e329171 100644 --- a/tools/mtx_to_graph.cc +++ b/tools/mtx_to_graph.cc @@ -1,11 +1,11 @@ +#include +#include +#include #include #include -#include #include #include -#include -#include -#include + int main(int argc, const char* argv[]) { if (argc != 3) { diff --git a/tools/one_to_one_mapping.cc b/tools/one_to_one_mapping.cc index 83a8e15b5..3c2c09320 100644 --- a/tools/one_to_one_mapping.cc +++ b/tools/one_to_one_mapping.cc @@ -25,25 +25,21 @@ ******************************************************************************/ #include - -#include #include -#include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/datastructures/partitioned_hypergraph.h" #include "mt-kahypar/datastructures/static_graph.h" #include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/datastructures/partitioned_hypergraph.h" -#include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" +#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/mapping/initial_mapping.h" -#include "mt-kahypar/utils/timer.h" +#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/metrics.h" #include "mt-kahypar/utils/randomize.h" +#include "mt-kahypar/utils/timer.h" using namespace mt_kahypar; namespace po = boost::program_options; diff --git a/tools/snap_graph_to_hgr.cc b/tools/snap_graph_to_hgr.cc index d226e51a2..55ff7dcc3 100644 --- a/tools/snap_graph_to_hgr.cc +++ b/tools/snap_graph_to_hgr.cc @@ -25,13 +25,10 @@ ******************************************************************************/ #include - #include #include #include -#include "mt-kahypar/macros.h" - namespace po = boost::program_options; int main(int argc, char* argv[]) { diff --git a/tools/snap_to_metis_converter.cc b/tools/snap_to_metis_converter.cc index 21561800e..ee4204680 100644 --- a/tools/snap_to_metis_converter.cc +++ b/tools/snap_to_metis_converter.cc @@ -25,13 +25,11 @@ ******************************************************************************/ #include - #include #include -#include #include +#include -#include "mt-kahypar/macros.h" #include "mt-kahypar/datastructures/hypergraph_common.h" using namespace mt_kahypar; diff --git a/tools/verify_partition.cc b/tools/verify_partition.cc index 1b3bc544d..39e1e863a 100644 --- a/tools/verify_partition.cc +++ b/tools/verify_partition.cc @@ -25,20 +25,14 @@ ******************************************************************************/ #include - -#include -#include -#include #include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/datastructures/partitioned_hypergraph.h" #include "mt-kahypar/datastructures/connectivity_info.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/datastructures/partitioned_hypergraph.h" +#include "mt-kahypar/datastructures/static_hypergraph.h" #include "mt-kahypar/io/hypergraph_factory.h" #include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/utils/cast.h" #include "mt-kahypar/utils/delete.h" diff --git a/tools/verify_process_mapping_partition.cc b/tools/verify_process_mapping_partition.cc index 911f3cd5f..5b16e9744 100644 --- a/tools/verify_process_mapping_partition.cc +++ b/tools/verify_process_mapping_partition.cc @@ -25,25 +25,20 @@ ******************************************************************************/ #include - -#include #include -#include -#include "mt-kahypar/macros.h" -#include "mt-kahypar/definitions.h" -#include "mt-kahypar/partition/context.h" -#include "mt-kahypar/partition/metrics.h" +#include "mt-kahypar/datastructures/partitioned_hypergraph.h" #include "mt-kahypar/datastructures/static_graph.h" #include "mt-kahypar/datastructures/static_hypergraph.h" -#include "mt-kahypar/datastructures/partitioned_hypergraph.h" -#include "mt-kahypar/io/hypergraph_io.h" +#include "mt-kahypar/definitions.h" #include "mt-kahypar/io/hypergraph_factory.h" +#include "mt-kahypar/io/hypergraph_io.h" #include "mt-kahypar/io/partitioning_output.h" -#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/context.h" #include "mt-kahypar/partition/mapping/initial_mapping.h" -#include "mt-kahypar/utils/timer.h" -#include "mt-kahypar/utils/randomize.h" +#include "mt-kahypar/partition/mapping/target_graph.h" +#include "mt-kahypar/partition/metrics.h" + using namespace mt_kahypar; namespace po = boost::program_options;