Skip to content

Commit

Permalink
[Tests] Update tests to use KaMinPar::borrow_and_mutate_graph()
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Oct 11, 2023
1 parent 08bb0d6 commit dc6291c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/endtoend/shm_endtoend_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TEST(ShmEndToEndTest, partitions_empty_unweighted_graph) {
std::vector<BlockID> partition{};
KaMinPar shm(4, create_default_context());
shm.set_output_level(OutputLevel::QUIET);
shm.take_graph(0, xadj.data(), adjncy.data(), nullptr, nullptr);
shm.borrow_and_mutate_graph(0, xadj.data(), adjncy.data(), nullptr, nullptr);
EXPECT_EQ(shm.compute_partition(0, 16, partition.data()), 0);
}
}
Expand All @@ -60,7 +60,7 @@ TEST(ShmEndToEndTest, partitions_empty_weighted_graph) {
std::vector<BlockID> partition{};
KaMinPar shm(4, create_default_context());
shm.set_output_level(OutputLevel::QUIET);
shm.take_graph(0, xadj.data(), adjncy.data(), vwgt.data(), adjwgt.data());
shm.borrow_and_mutate_graph(0, xadj.data(), adjncy.data(), vwgt.data(), adjwgt.data());
EXPECT_EQ(shm.compute_partition(0, 16, partition.data()), 0);
}
}
Expand Down Expand Up @@ -98,7 +98,7 @@ TEST(ShmEndToEndTest, partitions_unweighted_walshaw_data_graph) {
std::vector<BlockID> partition(n);
KaMinPar shm(1, create_default_context()); // 1 thread: deterministic
shm.set_output_level(OutputLevel::QUIET);
shm.take_graph(n, xadj.data(), adjncy.data(), nullptr, nullptr);
shm.borrow_and_mutate_graph(n, xadj.data(), adjncy.data(), nullptr, nullptr);

// Cut should be the same as before
EXPECT_EQ(shm.compute_partition(0, 16, partition.data()), reported_cut);
Expand Down

0 comments on commit dc6291c

Please sign in to comment.