mirror of https://github.com/CGAL/cgal
Protection parameter of Filtered_predicate2
This commit is contained in:
parent
634fe394ba
commit
caef69cdef
|
|
@ -37,6 +37,10 @@ namespace CGAL {
|
|||
// not, or we let all this up to the compiler optimizer to figure out ?
|
||||
// - Some caching could be done at the Point_2 level.
|
||||
|
||||
// Protection is undocumented and currently always true, meaning that it
|
||||
// assumes a default rounding mode of round-to-nearest. false would correspond
|
||||
// to a default of round-towards-infinity, so interval arithmetic does not
|
||||
// require protection but regular code may.
|
||||
|
||||
template <class EP, class AP, class C2E, class C2A, bool Protection = true>
|
||||
class Filtered_predicate
|
||||
|
|
|
|||
|
|
@ -39,7 +39,11 @@ namespace CGAL {
|
|||
// not, or we let all this up to the compiler optimizer to figure out ?
|
||||
// - Some caching could be done at the Point_2 level.
|
||||
|
||||
// FIXME: understand and document what the parameter 'Protection' means exactly
|
||||
// Protection has a different meaning than in Filtered_predicate, it says
|
||||
// whether we need to set the rounding mode: some predicates only do
|
||||
// comparisons and don't need it. Probably this should be done inside this
|
||||
// class, based on Uses_no_arithmetic, but I have some doubts about C2A,
|
||||
// converting a long long to Interval_nt requires protection.
|
||||
|
||||
template <class K, class EP, class AP, class C2E, class C2A, bool Protection = true>
|
||||
class Filtered_predicate2
|
||||
|
|
@ -88,7 +92,6 @@ public:
|
|||
catch (Uncertain_conversion_exception&) {}
|
||||
}
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp);
|
||||
Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
|
||||
return ep(c2e(std::forward<Args>(args))...);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue