cgal/Packages/Interval_arithmetic/TODO

109 lines
5.1 KiB
Plaintext
Raw Blame History

[See also the file TODO_static_filters]
- Filtered_kernel<> should be a proper kernel. It should be possible to use
the Kernel_base stuff (see Kernel_traits paper)...
- mv test/include/*.C *.def ; Or use template functions ?
Concerning the main code:
-------------------------
- Policy for overlapping comparisons : another good (faster) solution
would be to set a static boolean variable to indicate a buggy comparison
happenned (a la IEEE inexact flags). Drawback is that it's not thread safe,
but could be made safe with pthread_key_create()...
Clearly, all this stuff is policy.
struct overlap_throw {
void operator() const { throw(ce_qui_faut); }
};
Or :
class overlap_static {
static bool pipo = false;
public:
void operator() const { pipo = true; }
void reset() const { pipo = false; }
};
- Pentium 4 : gcc -march=pentium4 -mfpmath=sse supports something like:
#include <xmmintrin.h>
#include <iostream>
int main()
{
int i = _mm_getcsr();
std::cout << i << std::endl;
x = _MM_GET_ROUNDING_MODE()
_MM_SET_ROUNDING_MODE(x)
return 0;
}
Faut juste bien faire gaffe a __SSE2__ pour savoir quelle unite est utilisee
pour les calculs (x87 ou SSE2). Ca pourrait meme etre les deux (bonjour le
bordel...).
Avantage : y'a pas de risque d'overflow/underflow avec la SSE2, donc on peut
disabler le workaround.
Y'a peut-etre meme des instructions interessantes pour speeder l'IA avec la
SSE2.
- Use expression templates for Interval_nt<> and Lazy_exact_nt<>.
- Specializations for is_zero() and co, and make use of them in the kernel.
[Filtered_exact<> doesn't define them either, it's a bug...]
- SunPro 5.x supports Interval arithmetic...
http://docs.sun.com/htmlcoll/coll.693.1/iso-8859-1/CPPARITHPROG/iapg_bookTOC.html
http://www.sun.com/forte/cplusplus/interval/index.html;$sessionid$GSXJDFYAABWVTAMTA1FU45Q
- Try to get rid of the libc5 compatible version (make benchmarks first).
- Have determinant_by_formula() overloading for Lazy_exact_nt<> ?
And what about for Interval_nt<> too ?
- Turn CGAL_IA_CHECK_RESTRICT into an [expensive] assertion ?
- 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 ?
- Mark the cache as "mutable" (see Stroustrup, page 232) ?
- 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...)
- Replace CGAL_IA_MAX_DOUBLE by standard DBL_MAX in <cfloat>, if portable
(add a test). Not possible for CGAL_IA_MIN_DOUBLE, since DBL_MIN is the
_normalized_ minimum.
- See the C++ Standard numeric_limits<>, section 18.2.
? See ISO C99 and http://http.cs.berkeley.edu/~fateman/fp98/korenF/node3.html.
- "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 C99 ce que c'est]
? 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
Concerning the script:
----------------------
- Produce separate files for declarations and definitions (=> libCGAL).
Concerning the doc:
-------------------
- 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.
- DOCUMENT the new boolean template parameter, the script, the static filters.
Concerning the test-suite:
--------------------------
- Check it with GCOV again before the next public release.
- 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*...)