Revert parallelization on algorithms that are used in the server. Let node do this.

This reverts @6b2bf49 on the server algorithms.
This commit is contained in:
Daniel J. Hofmann 2015-09-09 19:09:27 +02:00
parent 85cef7e37c
commit 829b9d96e4
2 changed files with 3 additions and 14 deletions

View File

@ -35,14 +35,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <boost/assert.hpp>
#include <tbb/parallel_sort.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <algorithm>
#include <utility>
const double VIAPATH_ALPHA = 0.10;
const double VIAPATH_EPSILON = 0.15; // alternative at most 15% longer
@ -64,7 +60,6 @@ class AlternativeRouting final
{
}
NodeID node;
int length;
int sharing;
@ -292,7 +287,7 @@ class AlternativeRouting final
ranked_candidates_list.emplace_back(node, length_of_via_path, sharing_of_via_path);
}
}
tbb::parallel_sort(ranked_candidates_list);
std::sort(ranked_candidates_list.begin(), ranked_candidates_list.end());
NodeID selected_via_node = SPECIAL_NODEID;
int length_of_via_path = INVALID_EDGE_WEIGHT;

View File

@ -30,18 +30,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <boost/assert.hpp>
#include <tbb/parallel_sort.h>
#include "routing_base.hpp"
#include "../data_structures/search_engine_data.hpp"
#include "../util/integer_range.hpp"
#include "../util/timing_util.hpp"
#include "../typedefs.h"
#include <vector>
#include <algorithm>
#include <utility>
/// This is a striped down version of the general shortest path algorithm.
/// The general algorithm always computes two queries for each leg. This is only
/// necessary in case of vias, where the directions of the start node is constrainted
@ -167,8 +161,8 @@ class DirectShortestPathRouting final
{
return lhs.first < rhs.first || (lhs.first == rhs.first && lhs.second < rhs.second);
};
tbb::parallel_sort(forward_entry_points, entry_point_comparator);
tbb::parallel_sort(reverse_entry_points, entry_point_comparator);
std::sort(forward_entry_points.begin(), forward_entry_points.end(), entry_point_comparator);
std::sort(reverse_entry_points.begin(), reverse_entry_points.end(), entry_point_comparator);
NodeID last_id = SPECIAL_NODEID;
for (const auto p : forward_entry_points)