Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/444/partition bm fix #445

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions benchmark/Partition_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ static void PartitionHDRF_X(benchmark::State &state) {
g.addEdge(&(*e.second));
}
for (auto _ : state) {
auto result = g.partitionGraph(
CXXGraph::Partitioning::PartitionAlgorithm::HDRF_ALG, 4, 1, 0.001);
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
g, CXXGraph::Partitioning::PartitionAlgorithm::HDRF_ALG, 4, 1, 0.001);
}
}
BENCHMARK(PartitionHDRF_X)
Expand All @@ -24,8 +24,9 @@ BENCHMARK(PartitionHDRF_X)
static void PartitionHDRF_FromReadedCitHep(benchmark::State &state) {
auto edgeSet = cit_graph_ptr->getEdgeSet();
for (auto _ : state) {
auto result = cit_graph_ptr->partitionGraph(
CXXGraph::Partitioning::PartitionAlgorithm::HDRF_ALG, 4, 1, 0.001);
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
*cit_graph_ptr, CXXGraph::Partitioning::PartitionAlgorithm::HDRF_ALG, 4,
1, 0.001);
}
}

Expand All @@ -41,8 +42,8 @@ static void PartitionEBVC_X(benchmark::State &state) {
g.addEdge(&(*e.second));
}
for (auto _ : state) {
auto result = g.partitionGraph(
CXXGraph::Partitioning::PartitionAlgorithm::EDGEBALANCED_VC_ALG, 4);
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
g, CXXGraph::Partitioning::PartitionAlgorithm::EDGEBALANCED_VC_ALG, 4);
}
}
BENCHMARK(PartitionEBVC_X)
Expand All @@ -52,7 +53,8 @@ BENCHMARK(PartitionEBVC_X)
static void PartitionEBVC_FromReadedCitHep(benchmark::State &state) {
auto edgeSet = cit_graph_ptr->getEdgeSet();
for (auto _ : state) {
auto result = cit_graph_ptr->partitionGraph(
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
*cit_graph_ptr,
CXXGraph::Partitioning::PartitionAlgorithm::EDGEBALANCED_VC_ALG, 4);
}
}
Expand All @@ -69,8 +71,8 @@ static void PartitionGVC_X(benchmark::State &state) {
g.addEdge(&(*e.second));
}
for (auto _ : state) {
auto result = g.partitionGraph(
CXXGraph::Partitioning::PartitionAlgorithm::GREEDY_VC_ALG, 4);
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
g, CXXGraph::Partitioning::PartitionAlgorithm::GREEDY_VC_ALG, 4);
}
}
BENCHMARK(PartitionGVC_X)
Expand All @@ -80,7 +82,8 @@ BENCHMARK(PartitionGVC_X)
static void PartitionGVC_FromReadedCitHep(benchmark::State &state) {
auto edgeSet = cit_graph_ptr->getEdgeSet();
for (auto _ : state) {
auto result = cit_graph_ptr->partitionGraph(
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
*cit_graph_ptr,
CXXGraph::Partitioning::PartitionAlgorithm::GREEDY_VC_ALG, 4);
}
}
Expand All @@ -97,8 +100,8 @@ static void PartitionEBV_X(benchmark::State &state) {
g.addEdge(&(*e.second));
}
for (auto _ : state) {
auto result = g.partitionGraph(
CXXGraph::Partitioning::PartitionAlgorithm::EBV_ALG, 4, 1, 1);
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
g, CXXGraph::Partitioning::PartitionAlgorithm::EBV_ALG, 4, 1, 1);
}
}
BENCHMARK(PartitionEBV_X)
Expand All @@ -108,8 +111,9 @@ BENCHMARK(PartitionEBV_X)
static void PartitionEBV_FromReadedCitHep(benchmark::State &state) {
auto edgeSet = cit_graph_ptr->getEdgeSet();
for (auto _ : state) {
auto result = cit_graph_ptr->partitionGraph(
CXXGraph::Partitioning::PartitionAlgorithm::EBV_ALG, 4, 1, 1);
auto result = CXXGraph::Partitioning::Partitioner<int>::partitionGraph(
*cit_graph_ptr, CXXGraph::Partitioning::PartitionAlgorithm::EBV_ALG, 4,
1, 1);
}
}

Expand Down
Loading