Merge pull request #5399 from mglisse/eigen

Fix NewKernel_d/Eigen compatibility
This commit is contained in:
Laurent Rineau 2021-02-18 15:19:13 +01:00
commit d5a85ac4f4
4 changed files with 25 additions and 9 deletions

View File

@ -34,16 +34,18 @@
namespace CGAL { namespace CGAL {
template < typename FT_, typename Dim_, template < typename FT_, typename Dim_,
#if 1 #ifndef CGAL_NEWKERNEL_D_USE_EIGEN_VECTOR
# if 1
typename Vec_=Mix_vector<Array_vector<FT_, Dim_>, typename Vec_=Mix_vector<Array_vector<FT_, Dim_>,
Vector_vector<FT_, Dim_>, Vector_vector<FT_, Dim_>,
FT_, Dim_>, FT_, Dim_>,
#elif 0 # elif 0
typename Vec_=Array_vector<FT_, Dim_>, typename Vec_=Array_vector<FT_, Dim_>,
#elif 0 # else
typename Vec_=Vector_vector<FT_, Dim_>, typename Vec_=Vector_vector<FT_, Dim_>,
# endif
#else #else
// Dangerous because of alignment. Ok on x86_64 without AVX. // Dangerous before C++17 because of alignment. Ok on x86_64 without AVX.
typename Vec_=LA_eigen<FT_, Dim_>, typename Vec_=LA_eigen<FT_, Dim_>,
#endif #endif
typename LA_=LA_eigen<FT_,Dim_> > typename LA_=LA_eigen<FT_,Dim_> >

View File

@ -91,11 +91,9 @@ namespace CGAL {
}; };
struct Initializer_list { struct Initializer_list {
// Fix T==NT? result_type operator()(std::initializer_list<NT> l) const {
template<class T> return Iterator()(l.size(),l.begin(),l.end());
result_type operator()(std::initializer_list<T> l) const { }
return Iterator()(l.size(),l.begin(),l.end());
}
}; };
struct Values { struct Values {

View File

@ -0,0 +1,6 @@
#if __cpp_aligned_new >= 201606L
# define CGAL_NEWKERNEL_D_USE_EIGEN_VECTOR 1
# include "Epick_d.cpp"
#else
int main(){}
#endif

View File

@ -1594,6 +1594,16 @@ namespace Eigen {
}; };
}; };
template<class A, class B, class C>struct ScalarBinaryOpTraits;
template<bool b, typename BinaryOp>
struct ScalarBinaryOpTraits<CGAL::Interval_nt<b>, double, BinaryOp> {
typedef CGAL::Interval_nt<b> ReturnType;
};
template<bool b, typename BinaryOp>
struct ScalarBinaryOpTraits<double, CGAL::Interval_nt<b>, BinaryOp> {
typedef CGAL::Interval_nt<b> ReturnType;
};
namespace internal { namespace internal {
template<class> struct significant_decimals_impl; template<class> struct significant_decimals_impl;
template<bool b> template<bool b>