From 272ea9b92ed61b8768e81794951a0a3cf75f8842 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Tue, 4 Apr 2017 17:20:36 +0000 Subject: [PATCH] Fix test compilation --- include/customizer/cell_customizer.hpp | 3 ++- unit_tests/customizer/cell_customization.cpp | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/customizer/cell_customizer.hpp b/include/customizer/cell_customizer.hpp index 1288330ad..548f315a9 100644 --- a/include/customizer/cell_customizer.hpp +++ b/include/customizer/cell_customizer.hpp @@ -21,11 +21,12 @@ class CellCustomizer { bool from_clique; }; + + public: using Heap = util:: BinaryHeap>; using HeapPtr = tbb::enumerable_thread_specific; - public: CellCustomizer(const partition::MultiLevelPartition &partition) : partition(partition) {} template diff --git a/unit_tests/customizer/cell_customization.cpp b/unit_tests/customizer/cell_customization.cpp index 29b82c7af..38c23db85 100644 --- a/unit_tests/customizer/cell_customization.cpp +++ b/unit_tests/customizer/cell_customization.cpp @@ -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