Fix test compilation

This commit is contained in:
Patrick Niklaus 2017-04-04 17:20:36 +00:00 committed by Patrick Niklaus
parent 571681d019
commit 272ea9b92e
2 changed files with 12 additions and 9 deletions

View File

@ -21,11 +21,12 @@ class CellCustomizer
{
bool from_clique;
};
public:
using Heap = util::
BinaryHeap<NodeID, NodeID, EdgeWeight, HeapData, util::ArrayStorage<NodeID, int>>;
using HeapPtr = tbb::enumerable_thread_specific<Heap>;
public:
CellCustomizer(const partition::MultiLevelPartition &partition) : partition(partition) {}
template <typename GraphT>

View File

@ -59,6 +59,7 @@ BOOST_AUTO_TEST_CASE(two_level_test)
CellStorage storage(mlp, graph);
CellCustomizer customizer(mlp);
CellCustomizer::Heap heap(graph.GetNumberOfNodes());
auto cell_1_0 = storage.GetCell(1, 0);
auto cell_1_1 = storage.GetCell(1, 1);
@ -80,8 +81,8 @@ BOOST_AUTO_TEST_CASE(two_level_test)
REQUIRE_SIZE_RANGE(cell_1_1.GetOutWeight(2), 2);
REQUIRE_SIZE_RANGE(cell_1_1.GetInWeight(3), 2);
customizer.Customize(graph, storage, 1, 0);
customizer.Customize(graph, storage, 1, 1);
customizer.Customize(graph, heap, storage, 1, 0);
customizer.Customize(graph, heap, storage, 1, 1);
// cell 0
// check row source -> destination
@ -203,14 +204,15 @@ BOOST_AUTO_TEST_CASE(four_levels_test)
REQUIRE_SIZE_RANGE(cell_3_0.GetDestinationNodes(), 0);
CellCustomizer customizer(mlp);
CellCustomizer::Heap heap(graph.GetNumberOfNodes());
customizer.Customize(graph, storage, 1, 0);
customizer.Customize(graph, storage, 1, 1);
customizer.Customize(graph, storage, 1, 2);
customizer.Customize(graph, storage, 1, 3);
customizer.Customize(graph, heap, storage, 1, 0);
customizer.Customize(graph, heap, storage, 1, 1);
customizer.Customize(graph, heap, storage, 1, 2);
customizer.Customize(graph, heap, storage, 1, 3);
customizer.Customize(graph, storage, 2, 0);
customizer.Customize(graph, storage, 2, 1);
customizer.Customize(graph, heap, storage, 2, 0);
customizer.Customize(graph, heap, storage, 2, 1);
// level 1
// cell 0