Skip to content

Commit

Permalink
Parameterize small blocks threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
T3C42 committed Jan 27, 2025
1 parent ced6025 commit 761d9d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mt-kahypar/dynamic/strategies/localFM_small_blocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ namespace mt_kahypar::dyn {
for (const HyperedgeID& he : hypergraph.incidentEdges(hn)) {

for (const HypernodeID& hn2 : hypergraph.pins(he)) {
if (partitioned_hypergraph_s->pinCountInPart(he, partitioned_hypergraph_s->partID(hn2)) <= 5) {
if (partitioned_hypergraph_s->pinCountInPart(he, partitioned_hypergraph_s->partID(hn2)) <= context.dynamic.small_blocks_threshold) {
local_fm_nodes.push_back(hn2);
}
}
Expand Down
5 changes: 5 additions & 0 deletions mt-kahypar/io/command_line_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,11 @@ namespace mt_kahypar {
("d-server",
po::value<bool>(&context.dynamic.server)->value_name("<bool>"),
"If true, then the partitioner is started in server mode");
dynamic_options.add_options()
("d-sb-threshold",
po::value<size_t>(&context.dynamic.small_blocks_threshold)->value_name("<size_t>"),
"Threshold for the small blocks strategie");

return dynamic_options;
}

Expand Down
1 change: 1 addition & 0 deletions mt-kahypar/partition/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ struct DynamicParameters {
// not included in the output file ending
std::string result_folder = "";
bool server = false;
size_t small_blocks_threshold = 5;
// not a parameter
std::string output_path = "";
// logging values
Expand Down

0 comments on commit 761d9d4

Please sign in to comment.