mirror of https://github.com/CGAL/cgal
180 lines
8.6 KiB
Plaintext
180 lines
8.6 KiB
Plaintext
Concerning the new design of the Filtered_Exact_Cartesian <CT,ET>:
|
||
------------------------------------------------------------------
|
||
- In Cartesian<>, we currently have:
|
||
template < class R >
|
||
inline
|
||
Orientation
|
||
orientation(const PointC2<R CGAL_CTAG> &p,
|
||
const PointC2<R CGAL_CTAG> &q,
|
||
const PointC2<R CGAL_CTAG> &r)
|
||
{
|
||
return orientationC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y());
|
||
}
|
||
- We'll get something along the lines of LOOK:
|
||
template < class R >
|
||
inline
|
||
Orientation
|
||
orientation(const PointFEC2<R CGAL_CTAG> &p,
|
||
const PointFEC2<R CGAL_CTAG> &q,
|
||
const PointFEC2<R CGAL_CTAG> &r)
|
||
{
|
||
try {
|
||
return orientationC2(p.interval_x(), p.interval_y(),
|
||
q.interval_x(), q.interval_y(),
|
||
r.interval_x(), r.interval_y());
|
||
}
|
||
catch (...) {
|
||
return orientationC2(p.exact_x(), p.exact_y(),
|
||
q.exact_x(), q.exact_y(),
|
||
r.exact_x(), r.exact_y());
|
||
};
|
||
}
|
||
- PointFEC2<> will have:
|
||
additional virtual member functions: .interval_x(), .exact_x()...
|
||
additional data member, depending on the exact derivation of it.
|
||
- PointFEC2_midpoint<> will derive from PointFEC2<>, and have the necessary
|
||
stuff... Have a look at how midpoint() must look like...
|
||
|
||
|
||
Concerning the new filters:
|
||
---------------------------
|
||
- What to do with branches (e.g. collinearC3() and power_test()):
|
||
- The epsilon computation type should return ZERO/EQUAL as default.
|
||
This way, collinearC3() works.
|
||
- The user can provide the epsilon variant inside the source code, delimited
|
||
by special symbols /*CGAL_FILTER_BODY ... */. That's the solution for CGAL.
|
||
- Checks that the epsilons have been updated (which will not prove that
|
||
it's correct, but is better than nothing).
|
||
- /*DEGREE=2*/ attribute to the arguments ?
|
||
- /*CGAL_NO_FILTER*/ attribute instead of //CGAL_FILTER(BEGIN|END) ?
|
||
- Long term: match operator<(a,b) and co ?
|
||
- Or use G++ interface as a parser ?
|
||
- # of bounds : one per predicate, or one per argument ? give choice.
|
||
- # of epsilons: one per predicate, or one set per sub-predicate ? choice.
|
||
- Check that the compiler optimizes the epsilon computation
|
||
(use __attribute__((const)) for Static_filter_error operators) ?
|
||
- As Fred pointed out: the scheme is not thread safe.
|
||
- Remove the assertions in the original code.
|
||
- In case there are loops, we must take the max() of the epsilons.
|
||
This should not happen often, imho... Wait and see.
|
||
- Move static_infos in src/.
|
||
- Have a global ::number_of_failure for the static filters too.
|
||
(don't use IA_nt's one)
|
||
- Replace:
|
||
NEW_bound = max(NEW_bound, fabs(px.to_double()));
|
||
by:
|
||
if (NEW_bound < fabs(px.to_double())) NEW_bound = fabs(px.to_double());
|
||
or even, using a .bound() member function:
|
||
if (NEW_bound < px.bound()) NEW_bound = px.bound();
|
||
- Member function access for generical type should be (?):
|
||
.dbl_approx()
|
||
.bound() (basically a bound on: fabs(.dbl_approx()))
|
||
.error()
|
||
- Add a "number of bits" field in Static_filter_error ?
|
||
(so that we get the same thing as Fixed for 24 bits)
|
||
|
||
- Un patch dans GCC 2.96:
|
||
(C++) patch: -fno-enforce-eh-specs
|
||
|
||
To: gcc-patches at gcc dot gnu dot org
|
||
Subject: (C++) patch: -fno-enforce-eh-specs
|
||
From: Jason Merrill <jason at cygnus dot com>
|
||
Date: Fri, 10 Mar 2000 03:54:15 -0800
|
||
|
||
throw() specs are now useful for optimization, but they also incur a
|
||
penalty, as we need to trap any passing exception and call
|
||
unexpected. -fno-enforce-eh-specs disables that checking, much like
|
||
defining NDEBUG in code that uses assert.
|
||
|
||
2000-03-10 Jason Merrill <jason@casey.cygnus.com>
|
||
|
||
* lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
|
||
* cp-tree.h: Declare flag_enforce_eh_specs.
|
||
* decl.c (store_parm_decls, finish_function): Check it.
|
||
|
||
- Idem avec "C9x FP unordered compares":
|
||
+ /* ISO C99 IEEE Unordered compares. */
|
||
+ builtin_function ("__builtin_isgreater", default_function_type,
|
||
+ BUILT_IN_ISGREATER, BUILT_IN_NORMAL, NULL_PTR);
|
||
+ builtin_function ("__builtin_isgreaterequal", default_function_type,
|
||
+ BUILT_IN_ISGREATEREQUAL, BUILT_IN_NORMAL, NULL_PTR);
|
||
+ builtin_function ("__builtin_isless", default_function_type,
|
||
+ BUILT_IN_ISLESS, BUILT_IN_NORMAL, NULL_PTR);
|
||
+ builtin_function ("__builtin_islessequal", default_function_type,
|
||
+ BUILT_IN_ISLESSEQUAL, BUILT_IN_NORMAL, NULL_PTR);
|
||
+ builtin_function ("__builtin_islessgreater", default_function_type,
|
||
+ BUILT_IN_ISLESSGREATER, BUILT_IN_NORMAL, NULL_PTR);
|
||
+ builtin_function ("__builtin_isunordered", default_function_type,
|
||
+ BUILT_IN_ISUNORDERED, BUILT_IN_NORMAL, NULL_PTR);
|
||
[voir le draft C9X ce que c'est]
|
||
|
||
|
||
Concerning the main code:
|
||
-------------------------
|
||
- There are problems with Handle_for if the allocator is not standard, because
|
||
I allocate with new. Handle_for cannot work because the allocation doesn't
|
||
work for virtual derived types from RefCounted. I guess that's why it fails
|
||
for Aff_transformation too... What's the solution. Ask Stefan if he has a
|
||
clue.
|
||
- GCC 2.96 fails right now (and in a different way with -g and -O2...).......
|
||
Maybe it's temporary, so let's wait and retry later... [ today's 14 June 00 ]
|
||
- in _FPU.h, some functions are outside namespace CGAL...
|
||
- Check if the symbols beginning with an underscore must be fixed.
|
||
- Use STL's relational operators from <utility>. Check produced code before
|
||
switching for all...
|
||
- KCC and GCC 3 support.
|
||
- Turn CGAL_IA_CHECK_RESTRICT into an [expensive] assertion ?
|
||
- volatile should be removed from FPU_empiric_test() now that we enforce this
|
||
everywhere.
|
||
- Move the constant propagation barriers more deeply, where they are needed.
|
||
(i.e. just before the actual FP operations that need to be done at run time)
|
||
And go towards an ISO C9X compliant implementation.
|
||
- Mark the cache as "mutable" (see Stroustrup, page 232) ?
|
||
- Replace the NT wrapping, by Filtered_Cartesian<FT>, a new kernel ?
|
||
this would be cleaner, and won't rely on some optimizations in the compiler,
|
||
won't need partial specialization...
|
||
- Get rid of convert_to() ? This is a mess for nothing (benchmark first).
|
||
Target convert_from_to (const Target, const Source) is fine ?
|
||
It could maybe be made better this way:
|
||
void convert_from_to(Target &, const Source &) ?
|
||
Suggest that to Stefan for misc.h ?
|
||
- Handle in_smallest_orthogonalcircle_ftC2.h correctly (needs an include)
|
||
- Bench -fbranch-probabilities ? Use __builtin_expect() for GCC 3 ?
|
||
- Filter_Cache: Faire des benchs, et une test-suite qui soit raisonnable.
|
||
Hum, rajouter un bool<6F>en pour calculer le cache seulement sur demande ?
|
||
(<28>a <20>vite de le faire inutilement pour les variables interm<72>diaires,
|
||
mais <20>a prend un chouia plus de place... mais en comparaison du reste...)
|
||
? SUN: Add "-Wa,-xarch=v8plus" to fix the following "error":
|
||
/usr/ccs/bin/as: "/var/tmp/ccBHnU0T.s", line 861: warning: 3 instructions
|
||
required between ldfsr and next FBfcc; nops inserted
|
||
? See the C++ Standard numeric_limits<>, section 18.2.
|
||
? See C9X and http://http.cs.berkeley.edu/~fateman/fp98/korenF/node3.html.
|
||
? Implement convert_to for: long double, long long (CGAL..._64), CLN.
|
||
- Should IA_nt _privately_ derive from IA_nt_advanced ?
|
||
|
||
Concerning the script:
|
||
----------------------
|
||
- Produce separate files for declarations and definitions (=> libCGAL).
|
||
- Make it output a test file for each predicate ?
|
||
|
||
Concerning the doc:
|
||
-------------------
|
||
- Documentation seriously needs to be updated !!!!
|
||
- In the 2.0 HTML doc, my enums are indexed twice.
|
||
probably a cc_manual compliance bug from me.
|
||
Idem, my fct to_double(Ia) is not the same as the others...
|
||
- add a pointer to my MISC'99 paper.
|
||
- Use the new doc format.
|
||
- DOCUMENT the script, the new static stuff, the Lazy_exact_nt<> ...
|
||
- Add a long_description.txt file, with the directory/file structure of the
|
||
package (see RV's mail in folder "cgal", from 23/9/99).
|
||
|
||
Concerning the test-suite:
|
||
--------------------------
|
||
- Check it with GCOV again before the next public release.
|
||
- Add a simple test to check that exceptions do work indeed.
|
||
- Make a more extensive test-suite for the filtered predicates.
|
||
The script could output information to test them generically somehow.
|
||
- Test NaN propagation. Comparisons with these should throw the exception...
|
||
Check that they are correctly propagated (by min(), max(), even operator*...)
|