Merge remote-tracking branch 'cgal/6.0.x-branch' in master

This commit is contained in:
Sébastien Loriot 2024-12-04 14:13:01 +01:00
commit 11640a3946
7 changed files with 54 additions and 29 deletions

View File

@ -72,16 +72,16 @@ struct property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP>
namespace CGAL { \
template <CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS, typename CGAL_XX_YATP>\
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::type \
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
{ \
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
} \
\
template <CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS, typename CGAL_XX_YATP>\
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::const_type \
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
{ \
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
}\
} //CGAL namespace
@ -131,16 +131,16 @@ struct property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP>
namespace CGAL { \
template <typename CGAL_XX_YATP>\
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::type \
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
{ \
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
} \
\
template <typename CGAL_XX_YATP>\
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::const_type \
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
{ \
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
}\
} //CGAL namespace

View File

@ -77,13 +77,17 @@ namespace internal {
std::vector< Intersection_result > inters;
intersection(*c_pq, *c_qr, std::back_inserter(inters));
CGAL_assertion(assign(pair, inters[0]));
CGAL_assertion_code(bool ok=)
assign(pair, inters[0]);
CGAL_assertion(ok);
if(pair.second == 1)
{
if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first))
return pair.first;
CGAL_assertion(assign(pair, inters[1]));
CGAL_assertion_code(bool ok=)
assign(pair, inters[1]);
CGAL_assertion(ok);
return pair.first;
}
return pair.first;
@ -104,13 +108,17 @@ namespace internal {
std::vector< Intersection_result > inters;
intersection(*l, *c, std::back_inserter(inters));
CGAL_assertion(assign(pair,inters[0]));
CGAL_assertion_code(bool ok=)
assign(pair,inters[0]);
CGAL_assertion(ok);
if(pair.second == 1)
{
if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first))
return pair.first;
CGAL_assertion(assign(pair, inters[1]));
CGAL_assertion_code(bool ok=)
assign(pair, inters[1]);
CGAL_assertion(ok);
return pair.first;
}
return pair.first;
@ -240,12 +248,16 @@ namespace internal {
intersection(bis_pq, l_inf, std::back_inserter(inters));
std::pair<Circular_arc_point_2, unsigned> pair;
CGAL_assertion(assign(pair,inters[0]));
CGAL_assertion_code(bool ok=)
assign(pair,inters[0]);
CGAL_assertion(ok);
CGAL_assertion(pair.second == 1);
if(_gt.less_y_2_object()(p, q))
return Line_arc_2(bis_pq,a,pair.first);
CGAL_assertion(assign(pair,inters[1]));
CGAL_assertion_code(ok=)
assign(pair,inters[1]);
CGAL_assertion(ok);
CGAL_assertion(pair.second == 1);
return Line_arc_2(bis_pq,a,pair.first);
}
@ -261,7 +273,9 @@ namespace internal {
intersection(*c_pq, l_inf, std::back_inserter(inters));
std::pair<Circular_arc_point_2, unsigned> pair;
CGAL_assertion(assign(pair,inters[0]));
CGAL_assertion_code(bool ok=)
assign(pair,inters[0]);
CGAL_assertion(ok);
CGAL_assertion(pair.second == 1);
Hyperbolic_point_2 approx_pinf(to_double(pair.first.x()), to_double(pair.first.y()));
@ -275,7 +289,9 @@ namespace internal {
return Circular_arc_2(*c_pq, pair.first, a);
}
CGAL_assertion(assign(pair,inters[1]));
CGAL_assertion_code(ok=)
assign(pair,inters[1]);
CGAL_assertion(ok);
if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE)
return Circular_arc_2(*c_pq, pair.first, a);

View File

@ -433,12 +433,12 @@ if("${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES
)
else()
message(
STATUS "Using Intel Compiler version 11 or later. Adding -fp-model strict"
STATUS "Using Intel Compiler version 11 or later. Adding -fp-model=strict"
)
if(WIN32)
uniquely_add_flags(CGAL_CXX_FLAGS "/fp:strict")
else()
uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model strict")
uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model=strict")
endif()
endif()
endif()

View File

@ -132,11 +132,19 @@ function(CGAL_setup_CGAL_flags target)
$<$<COMPILE_LANGUAGE:CXX>:/bigobj> # Use /bigobj by default
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
message( STATUS "Using Intel Compiler. Adding -fp-model strict" )
if(WIN32)
target_compile_options(${target} INTERFACE "/fp:strict")
# cuda knows how to deal with 'fp-model=strict' but not 'fp-model strict'
if(CMAKE_VERSION VERSION_LESS 3.3)
if(WIN32)
target_compile_options(${target} INTERFACE "/fp:strict")
else()
target_compile_options(${target} INTERFACE "-fp-model=strict")
endif()
else()
target_compile_options(${target} INTERFACE "-fp-model" "strict")
if(WIN32)
target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:/fp:strict>")
else()
target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:-fp-model=strict>")
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
message( STATUS "Using SunPro compiler, using STLPort 4." )

View File

@ -443,11 +443,11 @@ template <unsigned int d_, unsigned int ambient_dim, \
typename boost::property_map< \
Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>, \
TAG<T> >::const_type \
get(TAG<T>, const Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&) \
get(TAG<T>, const Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&, const T& default_value = T()) \
{ \
typedef Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_> LCC;\
typedef typename boost::graph_traits<LCC>::DESC DESC; \
return internal::Dynamic_property_map<DESC,T>();\
return internal::Dynamic_property_map<DESC,T>(default_value);\
} \
\
template <unsigned int d_, unsigned int ambient_dim, \
@ -461,11 +461,11 @@ template <unsigned int d_, unsigned int ambient_dim, \
typename boost::property_map< \
Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>, \
TAG<T> >::type \
get(TAG<T>, Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&) \
get(TAG<T>, Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&, const T& default_value = T()) \
{ \
typedef Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_> LCC;\
typedef typename boost::graph_traits<LCC>::DESC DESC; \
return internal::Dynamic_property_map<DESC,T>();\
return internal::Dynamic_property_map<DESC,T>(default_value);\
} \
}

View File

@ -285,9 +285,9 @@ private:
// the 2 negations and we get wrong rounding.
typename Interval_nt<>::Internal_protector P;
CGAL_assertion_msg(-CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1),
"Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?");
"Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model=strict for Intel)?");
CGAL_assertion_msg(-CGAL_IA_DIV(-1., 10) != CGAL_IA_DIV(1., 10),
"Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?");
"Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model=strict for Intel)?");
}
};

View File

@ -21,9 +21,10 @@ typedef Remeshing_triangulation::Cell_handle Cell_handle;
int main(int argc, char* argv[])
{
const unsigned int nbv = (argc > 1) ? atoi(argv[1]) : 100;
CGAL::Random rng;
CGAL::Random rng = CGAL::get_default_random();
std::cout << "CGAL Random seed = " << CGAL::get_default_random().get_seed() << std::endl;
std::vector<Point> points;