[pgrouting-users] importance of -frounding-math compilation flag?
woodbri at swoodbridge.com
Sat Mar 16 21:04:33 PDT 2013
On 3/16/2013 8:36 PM, William Kyngesburye wrote:
> On Mar 16, 2013, at 6:47 PM, Stephen Woodbridge wrote:
>> On 3/16/2013 6:20 PM, William Kyngesburye wrote:
>>> I'm recompiling pgrouting on OS X Lion, using the clang
>>> compiler. clang does not have the -frounding-math option.
>>> I found one reference that the clang equivalent is
>>> --disable-fpmath, but that just causes and error "unsupported
>>> option '--disable-fpmath'". I could find no documentation that
>>> clang has or had this option, or something similar.
>>> Is the rounding behavior critical?
>> I do not know for a fact one way or the other, But I'm guess that
>> this options probably is not critical for MOST pgrouting
>> Where it MIGHT be important is for the CGAL library and/or GAUL
>> libraries. CGAL specifically does a lot of math. You might check
>> those packages so see what they do with respect to fp rounding on
>> OS X.
>> If anyone knows more about this please correct this AND we should
>> document it somewhere for future reference.
> I didn't need to recompile CGAL, so I didn't see a problem there.
> But I see that it also uses -frounding-math for GCC, but nothing for
> clang. The changes log does say CGAL fully supports clang as of CGAL
> 4.1, so maybe rounding behavior is not an issue or the code works
> around it.
> All I could find in GAUL is a macro define for ROUND which looks like
> proper rounding towards 0.
> I found another reference, for CGAL and OSX/clang:
> I guess we're screwed, if the rounding behavior is important to
> compiler optimization in CGAL and pgRouting. (the previous reference
> for the supposed --disable-fpmath option was from Fink. Never liked
OK, so CGAL is only used for building drive time polygons. The rest of
pgRouting should work just fine. I am also considering removing CGAL in
Rev 2.0 and using a much smaller and simpler code set that I have used
in the past.
This rounding issue might be a more serious issue GEOS which is the
underlying geometery library used in postGIS, so I wonder what they are
doing about this.
> ----- William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> "We are at war with them. Neither in hatred nor revenge and with no
> particular pleasure I shall kill every ___ I can until the war is
> over. That is my duty."
> "Don't you even hate 'em?"
> "What good would it do if I did? If all the many millions of people
> of the allied nations devoted an entire year exclusively to hating
> the ____ it wouldn't kill one ___ nor shorten the war one day."
> <Ha, ha> "And it might give 'em all stomach ulcers."
> - Tarzan, on war
> _______________________________________________ Pgrouting-users
> mailing list Pgrouting-users at lists.osgeo.org
More information about the Pgrouting-users