Skip to content

Commit

Permalink
remove set max part weights for round function
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgottesbueren committed Aug 31, 2023
1 parent 4a1ab97 commit b04b5f6
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions mt-kahypar/partition/refinement/do_nothing_refiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ class DoNothingRefiner final : public IRebalancer {
return false;
}

void setMaxPartWeightsForRoundImpl(const std::vector<HypernodeWeight>&) override final { }

virtual bool refineAndOutputMovesImpl(mt_kahypar_partitioned_hypergraph_t&,
const parallel::scalable_vector<HypernodeID>&,
parallel::scalable_vector<parallel::scalable_vector<Move>>&,
Expand Down
1 change: 0 additions & 1 deletion mt-kahypar/partition/refinement/fm/multitry_kway_fm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ namespace mt_kahypar {
HEAVY_REFINEMENT_ASSERT(phg.checkTrackedPartitionInformation(gain_cache));

tmp_metrics.imbalance = metrics::imbalance(phg, context);
rebalancer.setMaxPartWeightsForRound(max_part_weights);
rebalancer.refineAndOutputMoves(hypergraph, {}, moves_by_part, tmp_metrics, current_time_limit);
timer.stop_timer("rebalance_fm");

Expand Down
6 changes: 0 additions & 6 deletions mt-kahypar/partition/refinement/i_refiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ class IRebalancer: public IRefiner {
public:
virtual ~IRebalancer() = default;

// setup allowed part weights for next call to refine (otherwise, part weights from context are used)
void setMaxPartWeightsForRound(const std::vector<HypernodeWeight>& max_part_weights) {
setMaxPartWeightsForRoundImpl(max_part_weights);
}

bool refineAndOutputMoves(mt_kahypar_partitioned_hypergraph_t& hypergraph,
const parallel::scalable_vector<HypernodeID>& refinement_nodes,
parallel::scalable_vector<parallel::scalable_vector<Move>>& moves_by_part,
Expand All @@ -94,7 +89,6 @@ class IRebalancer: public IRefiner {
IRebalancer() = default;

private:
virtual void setMaxPartWeightsForRoundImpl(const std::vector<HypernodeWeight>& max_part_weights) = 0;

virtual bool refineAndOutputMovesImpl(mt_kahypar_partitioned_hypergraph_t& hypergraph,
const parallel::scalable_vector<HypernodeID>& refinement_nodes,
Expand Down
4 changes: 0 additions & 4 deletions mt-kahypar/partition/refinement/rebalancing/rebalancer.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ class Rebalancer final : public IRebalancer {

void initializeImpl(mt_kahypar_partitioned_hypergraph_t&) final { }

void setMaxPartWeightsForRoundImpl(const std::vector<HypernodeWeight>&) {
ALWAYS_ASSERT(false, "not implemented");
}

bool refineAndOutputMovesImpl(mt_kahypar_partitioned_hypergraph_t&,
const vec<HypernodeID>&,
vec<vec<Move>>&,
Expand Down
6 changes: 0 additions & 6 deletions mt-kahypar/partition/refinement/rebalancing/rebalancer_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,6 @@ void RebalancerV2<TypeTraits, GainTypes>::initializeImpl(mt_kahypar_partitioned_
unused(phg);
}


template <typename TypeTraits, typename GainTypes>
void RebalancerV2<TypeTraits, GainTypes>::setMaxPartWeightsForRoundImpl(const std::vector<HypernodeWeight>& max_part_weights) {
_max_part_weights = &max_part_weights[0];
}

template <typename TypeTraits, typename GainTypes>
bool RebalancerV2<TypeTraits, GainTypes>::refineAndOutputMovesImpl(mt_kahypar_partitioned_hypergraph_t& hypergraph,
const vec<HypernodeID>& ,
Expand Down
2 changes: 0 additions & 2 deletions mt-kahypar/partition/refinement/rebalancing/rebalancer_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ class RebalancerV2 final : public IRebalancer {

void initializeImpl(mt_kahypar_partitioned_hypergraph_t& hypergraph) final;

void setMaxPartWeightsForRoundImpl(const std::vector<HypernodeWeight>& max_part_weights) final;

bool refineAndOutputMovesImpl(mt_kahypar_partitioned_hypergraph_t& hypergraph,
const vec<HypernodeID>& refinement_nodes,
vec<vec<Move>>& moves_by_part,
Expand Down

0 comments on commit b04b5f6

Please sign in to comment.