@@ -246,12 +246,24 @@ void ContractNode(ContractorThreadData *data,
246
246
if (RUNSIMULATION)
247
247
{
248
248
const int constexpr SIMULATION_SEARCH_SPACE_SIZE = 1000 ;
249
- search (heap, graph, contractable, number_of_targets, SIMULATION_SEARCH_SPACE_SIZE, max_weight, node);
249
+ search (heap,
250
+ graph,
251
+ contractable,
252
+ number_of_targets,
253
+ SIMULATION_SEARCH_SPACE_SIZE,
254
+ max_weight,
255
+ node);
250
256
}
251
257
else
252
258
{
253
259
const int constexpr FULL_SEARCH_SPACE_SIZE = 2000 ;
254
- search (heap, graph, contractable, number_of_targets, FULL_SEARCH_SPACE_SIZE, max_weight, node);
260
+ search (heap,
261
+ graph,
262
+ contractable,
263
+ number_of_targets,
264
+ FULL_SEARCH_SPACE_SIZE,
265
+ max_weight,
266
+ node);
255
267
}
256
268
for (auto out_edge : graph.GetAdjacentEdgeRange (node))
257
269
{
@@ -490,7 +502,8 @@ bool UpdateNodeNeighbours(ContractorNodeData &node_data,
490
502
if (node_data.contractable [u])
491
503
{
492
504
node_data.priorities [u] = EvaluateNodePriority (
493
- SimulateNodeContraction (data, graph, u, node_data.weights , node_data.contractable ), node_data.depths [u]);
505
+ SimulateNodeContraction (data, graph, u, node_data.weights , node_data.contractable ),
506
+ node_data.depths [u]);
494
507
}
495
508
}
496
509
return true ;
@@ -621,19 +634,20 @@ std::vector<bool> contractGraph(ContractorGraph &graph,
621
634
{
622
635
util::UnbufferedLog log;
623
636
log << " initializing node priorities..." ;
624
- tbb::parallel_for (tbb::blocked_range<std::size_t >(0 , remaining_nodes.size (), PQGrainSize),
625
- [&](const auto &range)
626
- {
627
- ContractorThreadData *data = thread_data_list.GetThreadData ();
628
- for (auto x = range.begin (), end = range.end (); x != end; ++x)
629
- {
630
- auto node = remaining_nodes[x].id ;
631
- BOOST_ASSERT (node_data.contractable [node]);
632
- node_data.priorities [node] = EvaluateNodePriority (
633
- SimulateNodeContraction (data, graph, node, node_data.weights , node_data.contractable ),
634
- node_data.depths [node]);
635
- }
636
- });
637
+ tbb::parallel_for (
638
+ tbb::blocked_range<std::size_t >(0 , remaining_nodes.size (), PQGrainSize),
639
+ [&](const auto &range)
640
+ {
641
+ ContractorThreadData *data = thread_data_list.GetThreadData ();
642
+ for (auto x = range.begin (), end = range.end (); x != end; ++x)
643
+ {
644
+ auto node = remaining_nodes[x].id ;
645
+ BOOST_ASSERT (node_data.contractable [node]);
646
+ node_data.priorities [node] = EvaluateNodePriority (
647
+ SimulateNodeContraction (data, graph, node, node_data.weights , node_data.contractable ),
648
+ node_data.depths [node]);
649
+ }
650
+ });
637
651
log << " ok." ;
638
652
}
639
653
0 commit comments