diff --git a/Packages/Interval_arithmetic/TODO b/Packages/Interval_arithmetic/TODO index e6594d3a366..cc3363c817e 100644 --- a/Packages/Interval_arithmetic/TODO +++ b/Packages/Interval_arithmetic/TODO @@ -50,8 +50,6 @@ Concerning the code itself: Et modifier le comportement dans les fonctions save/restore ? - converter (long longs), (long doubles)... au moins documenter que c'est pas supporté pour le moment. Hint: (double) +/- 1ulp. -? try if __attribute__((const)) for GNU on my operators is ok, and speed up ? - what about putting it on predicates too ? ? Currently, some types (leda_*, GMP) need the rounding to nearest for doing the conversion to Interval. That's bad because double doesn't, and is the case that must be optimized. Maybe have a Tag for each NT saying if/how it @@ -66,41 +64,25 @@ Concerning the code itself: Concerning the script: -- Try to match the types "CGAL::Sign" ? - et ne pas être pédantic sur les espaces qui manquent... +- Try to be less pedantic (accept more C++). - Add a warning/check to the argument being "const". - Add determinant_signs.h to the list of filtered files ? And send the 3 lines to Stefan to add to the end of the original determinant.h. - Produire un fichier avec juste les déclarations, et un autre avec les définitions, ça aidera à faire une library séparée de trucs précompilés. -- Add a comment for the parser script, e.g. /*No_Filter*/, because some - predicates don't need to be filtered: - - compare_lexicographically_xyC2 - - collinear_are_ordered_along_lineC2 - - collinear_are_strictly_ordered_along_lineC2 - - compare_lexicographically_xyzC3 - - collinear_are_ordered_along_lineC3 - - collinear_are_strictly_ordered_along_lineC3 - There's no way to guess when parsing. - Anyway for the filtered constructions, the scheme will have to be rethought. -? Clean it up, and comment it... Concerning the doc: - Dans la doc html de CGAL-2.0, mes enums sont répertoriés 2 fois dans l'index, sûrement un bug de cc_manual compliance de ma part. de même plus loin, ma fct to_double(Ia) n'est pas pareille que les autres. -- documenter une fonction CGAL::force_ieee_754_double_precision(), dans la - doc, pour que le user puisse forcer sur __i386 si ça lui chante. Dans la - doc, à l'endroit de l'intro de la support library (rajouter un - include/CGAL/FPU.h qui fasse juste ça ?) -- documenter le mécanisme pour les prédicats? Il me semblerait utile de +- RV: "documenter le mécanisme pour les prédicats? Il me semblerait utile de rajouter une section d'introduction ou bien à la fin du chapitre, pour expliquer comment utiliser les filtres. Peut-être une référence à ton - chapitre sur l'arithmétique d'intervalles... -- change the status of homogeneous predicates when available... + chapitre sur l'arithmétique d'intervalles..." - add a pointer to my MISC'99 paper. -- Document "IA::number_of_failures". +- Document "IA::number_of_failures", once overlap_action() is made + customisable. - Documenter le mécanisme de cache. - Documenter .exact(), .interval() et .value(). - Passer au nouveau format de doc. diff --git a/Packages/Interval_arithmetic/changes.txt b/Packages/Interval_arithmetic/changes.txt index aa3546adebb..1ae4a2a6388 100644 --- a/Packages/Interval_arithmetic/changes.txt +++ b/Packages/Interval_arithmetic/changes.txt @@ -1,5 +1,16 @@ Changes done to the Interval Arithmetic package. +Version 4.19 on 6 July 1999 +- The script now locally (in the produced file) defines + "CGAL_DONT_NEED_FILTER", so the user can conditionnaly exclude some code + in the produced file with "#ifndef CGAL_DONT_NEED_FILTER". For example, + some predicates that don't need to be filtered because they are already + exact (e.g. lexico*). +- Fix for MipsPro. +- New function force_ieee_double_precision(), that sets the correct IEEE + double precision on Intel only. +- CygWin compiles. + Version 4.18 on 30 June 1999 - Cleaned up _FPU.h, no more CGAL_*ASSEMBLY* macros, using GNU libc macros on Linux/PPC (x86 keeps the old asm() for compatibility with libc5). diff --git a/Packages/Interval_arithmetic/examples/Interval_arithmetic/include/CGAL/Arithmetic_filter/template_predicates_on_ft.h b/Packages/Interval_arithmetic/examples/Interval_arithmetic/include/CGAL/Arithmetic_filter/template_predicates_on_ft.h index 47b5c2481d0..67b1bbadfab 100644 --- a/Packages/Interval_arithmetic/examples/Interval_arithmetic/include/CGAL/Arithmetic_filter/template_predicates_on_ft.h +++ b/Packages/Interval_arithmetic/examples/Interval_arithmetic/include/CGAL/Arithmetic_filter/template_predicates_on_ft.h @@ -1,22 +1,14 @@ -// This is an extract from include/CGAL/predicates_on_ftC2.h -// It's a template predicate. +// It's a template predicate, given as an example to make your own predicates. -#ifndef CGAL_ARITHMETIC_FILTER_TEMPLATE_PREDICATES_ON_FT_H -#define CGAL_ARITHMETIC_FILTER_TEMPLATE_PREDICATES_ON_FT_H - -// This file is automatically generated by the script for filtering -// predicates, using Interval arithmetic. - -CGAL_BEGIN_NAMESPACE +#ifndef TEMPLATE_PREDICATES_ON_FT_H +#define TEMPLATE_PREDICATES_ON_FT_H #ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE > #endif -// CGAL_KERNEL_LARGE_INLINE -Comparison_result +CGAL::Comparison_result compare_xC2( - const CGAL::Filtered_exact &px, - const CGAL::Filtered_exact &py, + const CGAL::Filtered_exact &px, const CGAL::Filtered_exact &l1a, const CGAL::Filtered_exact &l1b, @@ -30,9 +22,8 @@ compare_xC2( CGAL::FPU_set_cw(CGAL::FPU_cw_up); try { - Comparison_result result = compare_xC2( + CGAL::Comparison_result result = compare_xC2( px.interval(), - py.interval(), l1a.interval(), l1b.interval(), l1c.interval(), @@ -47,7 +38,6 @@ compare_xC2( CGAL::FPU_set_cw(backup); return compare_xC2( px.exact(), - py.exact(), l1a.exact(), l1b.exact(), l1c.exact(), @@ -57,10 +47,12 @@ compare_xC2( } } -CGAL_END_NAMESPACE - #ifdef CGAL_ARITHMETIC_FILTER_H -#include +#include #endif -#endif // CGAL_ARITHMETIC_FILTER_TEMPLATE_PREDICATES_ON_FT_H +#endif // TEMPLATE_PREDICATES_ON_FT_H + +#ifdef CGAL_DONT_NEED_FILTER +#undef CGAL_DONT_NEED_FILTER +#endif diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h index 10491ede9aa..fa3696cbc02 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h @@ -1,4 +1,4 @@ -// ============================================================================ +// ====================================================================== // // Copyright (c) 1999 The CGAL Consortium // @@ -6,12 +6,13 @@ // of the Computational Geometry Algorithms Library (CGAL). It is not // intended for general use. // -// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------- // // release : // release_date : // // file : include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h +// package : Interval_arithmetic // revision : $Revision$ // revision_date : // author(s) : Sylvain.Pion@sophia.inria.fr @@ -19,7 +20,7 @@ // // coordinator : Mariette Yvinec // -// ============================================================================ +// ====================================================================== #ifndef CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H #define CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H @@ -27,6 +28,9 @@ // This file is automatically generated by the script for filtering // predicates, using Interval arithmetic. +// This will exclude these predicates that do not need to be filtered +#define CGAL_DONT_NEED_FILTER + // This file contains the low level cartesian predicates // used by the 2D regular triangulation. @@ -152,3 +156,7 @@ CGAL_END_NAMESPACE #endif #endif // CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H + +#ifdef CGAL_DONT_NEED_FILTER +#undef CGAL_DONT_NEED_FILTER +#endif diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h index ccee241e2dd..bb22fe8193a 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h @@ -1,4 +1,4 @@ -// ============================================================================ +// ====================================================================== // // Copyright (c) 1999 The CGAL Consortium // @@ -6,12 +6,13 @@ // of the Computational Geometry Algorithms Library (CGAL). It is not // intended for general use. // -// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------- // // release : // release_date : // // file : include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h +// package : Interval_arithmetic // revision : $Revision$ // revision_date : // author(s) : Sylvain.Pion@sophia.inria.fr @@ -19,7 +20,7 @@ // // coordinator : Mariette Yvinec // -// ============================================================================ +// ====================================================================== #ifndef CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H #define CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H @@ -27,6 +28,9 @@ // This file is automatically generated by the script for filtering // predicates, using Interval arithmetic. +// This will exclude these predicates that do not need to be filtered +#define CGAL_DONT_NEED_FILTER + // This file contains the low level homogeneous predicates // used by the 2D regular triangulation. @@ -173,3 +177,7 @@ CGAL_END_NAMESPACE #endif #endif // CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H + +#ifdef CGAL_DONT_NEED_FILTER +#undef CGAL_DONT_NEED_FILTER +#endif diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC2.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC2.h index a7a0af96058..3fa6d8d42a0 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC2.h +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC2.h @@ -30,6 +30,9 @@ // This file is automatically generated by the script for filtering // predicates, using Interval arithmetic. +// This will exclude these predicates that do not need to be filtered +#define CGAL_DONT_NEED_FILTER + #ifndef CGAL_NUMBER_UTILS_H #include #endif // CGAL_NUMBER_UTILS_H @@ -1054,3 +1057,7 @@ CGAL_END_NAMESPACE #endif #endif // CGAL_ARITHMETIC_FILTER_PREDICATES_ON_FTC2_H + +#ifdef CGAL_DONT_NEED_FILTER +#undef CGAL_DONT_NEED_FILTER +#endif diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC3.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC3.h index 90b89922d03..faba451a5da 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC3.h +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates_on_ftC3.h @@ -29,6 +29,9 @@ // This file is automatically generated by the script for filtering // predicates, using Interval arithmetic. +// This will exclude these predicates that do not need to be filtered +#define CGAL_DONT_NEED_FILTER + #ifndef CGAL_DETERMINANT_H #include #endif // CGAL_DETERMINANT_H @@ -982,3 +985,7 @@ CGAL_END_NAMESPACE #endif #endif // CGAL_ARITHMETIC_FILTER_PREDICATES_ON_FTC3_H + +#ifdef CGAL_DONT_NEED_FILTER +#undef CGAL_DONT_NEED_FILTER +#endif diff --git a/Packages/Interval_arithmetic/test/Interval_arithmetic/Makefile b/Packages/Interval_arithmetic/test/Interval_arithmetic/Makefile index aff613618b9..007bb975fc5 100644 --- a/Packages/Interval_arithmetic/test/Interval_arithmetic/Makefile +++ b/Packages/Interval_arithmetic/test/Interval_arithmetic/Makefile @@ -22,7 +22,7 @@ CXXFLAGS = -I../../include \ $(TESTSUITE_CXXFLAGS) \ $(CGAL_CXXFLAGS) \ -DCGAL_NO_ASSERTIONS -DCGAL_NO_PRECONDITIONS -DCGAL_NO_POSTCONDITIONS\ - -O2 -DLOOPS=100000 -W + -O6 -fomit-frame-pointer -DLOOPS=100000 -W # -fpermissive # -DCGAL_NO_ASSERTIONS -DCGAL_NO_PRECONDITIONS -DCGAL_NO_POSTCONDITIONS\ # -O2 -W -Winline -Wunused -malign-double diff --git a/Packages/Interval_arithmetic/test/Interval_arithmetic/tst6.C b/Packages/Interval_arithmetic/test/Interval_arithmetic/tst6.C index b7f6c0d8746..62a01780d72 100644 --- a/Packages/Interval_arithmetic/test/Interval_arithmetic/tst6.C +++ b/Packages/Interval_arithmetic/test/Interval_arithmetic/tst6.C @@ -11,6 +11,15 @@ double force2mem(const double a) return CGAL_IA_FORCE_TO_DOUBLE(a); } +CGAL::Interval_nt_advanced add( const CGAL::Interval_nt_advanced & a, + const CGAL::Interval_nt_advanced & b) +{ + CGAL::Interval_nt_advanced c,d; + c = a+b; + d = a+b; + return c+d; +} + template < class NT > void test (const NT &) { diff --git a/Packages/Interval_arithmetic/version b/Packages/Interval_arithmetic/version index 3b33a257456..861015b4f13 100644 --- a/Packages/Interval_arithmetic/version +++ b/Packages/Interval_arithmetic/version @@ -1 +1 @@ -4.18 (30 Jun 1999) +4.19 ( 6 Jul 1999)