#pragma once #include "coarsening/parallel_label_propagation_coarsener.h" #include "datastructure/graph.h" #include "helper.h" #include "partitioning_scheme/helper.h" #include "refinement/parallel_balancer.h" #include "refinement/parallel_label_propagation_refiner.h" #include #include #include #include #include namespace kaminpar::partitioning { class ParallelInitialPartitioner { static constexpr bool kDebug = false; public: ParallelInitialPartitioner(const Context &input_ctx, GlobalInitialPartitionerMemoryPool &ip_m_ctx_pool, TemporaryGraphExtractionBufferPool &ip_extraction_pool); PartitionedGraph partition(const Coarsener *coarsener, const PartitionContext &p_ctx); private: PartitionedGraph partition_recursive(const Coarsener *parent_coarsener, PartitionContext &p_ctx, std::size_t num_threads); PartitionedGraph split_and_join(const Coarsener *coarsener, const PartitionContext &p_ctx, bool converged, std::size_t num_threads); const Context &_input_ctx; GlobalInitialPartitionerMemoryPool &_ip_m_ctx_pool; TemporaryGraphExtractionBufferPool &_ip_extraction_pool; }; } // namespace kaminpar::partitioning