Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54059 - in trunk/boost/graph: . distributed
From: ngedmond_at_[hidden]
Date: 2009-06-18 14:29:54


Author: ngedmond
Date: 2009-06-18 14:29:53 EDT (Thu, 18 Jun 2009)
New Revision: 54059
URL: http://svn.boost.org/trac/boost/changeset/54059

Log:
Removed x87 floating point precision workarounds as this was moved to boost/graph/relax.hpp in r54044.

This commit refs ticket #3134 as it will need to be merged to the release branch.

Text files modified:
   trunk/boost/graph/astar_search.hpp | 17 ++---------------
   trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp | 12 +-----------
   2 files changed, 3 insertions(+), 26 deletions(-)

Modified: trunk/boost/graph/astar_search.hpp
==============================================================================
--- trunk/boost/graph/astar_search.hpp (original)
+++ trunk/boost/graph/astar_search.hpp 2009-06-18 14:29:53 EDT (Thu, 18 Jun 2009)
@@ -172,20 +172,10 @@
 
       template <class Edge, class Graph>
       void gray_target(Edge e, Graph& g) {
- distance_type old_distance = get(m_distance, target(e, g));
-
         m_decreased = relax(e, g, m_weight, m_predecessor, m_distance,
                             m_combine, m_compare);
 
- /* On x86 Linux with optimization, we sometimes get into a
- horrible case where m_decreased is true but the distance hasn't
- actually changed. This occurs when the comparison inside
- relax() occurs with the 80-bit precision of the x87 floating
- point unit, but the difference is lost when the resulting
- values are written back to lower-precision memory (e.g., a
- double). With the eager Dijkstra's implementation, this results
- in looping. */
- if(m_decreased && old_distance != get(m_distance, target(e, g))) {
+ if(m_decreased) {
           put(m_cost, target(e, g),
               m_combine(get(m_distance, target(e, g)),
                         m_h(target(e, g))));
@@ -198,13 +188,10 @@
 
       template <class Edge, class Graph>
       void black_target(Edge e, Graph& g) {
- distance_type old_distance = get(m_distance, target(e, g));
-
         m_decreased = relax(e, g, m_weight, m_predecessor, m_distance,
                             m_combine, m_compare);
 
- /* See comment in gray_target */
- if(m_decreased && old_distance != get(m_distance, target(e, g))) {
+ if(m_decreased) {
           m_vis.edge_relaxed(e, g);
           put(m_cost, target(e, g),
               m_combine(get(m_distance, target(e, g)),

Modified: trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp
==============================================================================
--- trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp (original)
+++ trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp 2009-06-18 14:29:53 EDT (Thu, 18 Jun 2009)
@@ -113,20 +113,10 @@
     boost::parallel::caching_property_map<PredecessorMap> c_pred(m_predecessor);
     boost::parallel::caching_property_map<DistanceMap> c_dist(m_distance);
 
- distance_type old_distance = get(c_dist, target(e, g));
-
     bool m_decreased = relax(e, g, m_weight, c_pred, c_dist,
                              m_combine, m_compare);
 
- /* On x86 Linux with optimization, we sometimes get into a
- horrible case where m_decreased is true but the distance hasn't
- actually changed. This occurs when the comparison inside
- relax() occurs with the 80-bit precision of the x87 floating
- point unit, but the difference is lost when the resulting
- values are written back to lower-precision memory (e.g., a
- double). With the eager Dijkstra's implementation, this results
- in looping. */
- if (m_decreased && old_distance != get(c_dist, target(e, g))) {
+ if (m_decreased) {
       m_Q.update(target(e, g));
       m_vis.edge_relaxed(e, g);
     } else


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk