mirror of https://github.com/CGAL/cgal
Merge pull request #3602 from afabri/CGAL-VC2017_AVX_workarounds-GF
Fix for VC2017 with /arch:AVX
This commit is contained in:
commit
f83053c2a5
|
|
@ -68,6 +68,19 @@ struct I_Infinity_distance_2
|
||||||
: public CGAL::cpp98::binary_function<
|
: public CGAL::cpp98::binary_function<
|
||||||
Point_2< R >, Point_2< R >, typename R::FT >
|
Point_2< R >, Point_2< R >, typename R::FT >
|
||||||
{
|
{
|
||||||
|
// Added as workaround for VC2017 with /arch:AVX to fix
|
||||||
|
// https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-I-95/Rectangular_p_center_2_Examples/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Release-64bits.gz
|
||||||
|
I_Infinity_distance_2()
|
||||||
|
{}
|
||||||
|
|
||||||
|
I_Infinity_distance_2(const I_Infinity_distance_2&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
I_Infinity_distance_2& operator=(const I_Infinity_distance_2&)
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
typename R::FT
|
typename R::FT
|
||||||
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const {
|
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const {
|
||||||
return (std::max)(CGAL_NTS abs(q1.x() - q2.x()),
|
return (std::max)(CGAL_NTS abs(q1.x() - q2.x()),
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,18 @@ struct Extremal_polygon_perimeter_traits_2 {
|
||||||
|
|
||||||
Kgon_triangle_perimeter(const K& k_): k(k_) {}
|
Kgon_triangle_perimeter(const K& k_): k(k_) {}
|
||||||
|
|
||||||
|
// Added as workaround for VC2017 with /arch:AVX to fix
|
||||||
|
// https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-I-95/Inscribed_areas_Examples/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Release-64bits.gz
|
||||||
|
Kgon_triangle_perimeter(const Kgon_triangle_perimeter& other)
|
||||||
|
: k(other.k)
|
||||||
|
{}
|
||||||
|
|
||||||
|
Kgon_triangle_perimeter& operator=(const Kgon_triangle_perimeter& other)
|
||||||
|
{
|
||||||
|
k = other.k;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
|
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
|
||||||
{ return dist(p, r) + dist(p, q) - dist(q, r); }
|
{ return dist(p, r) + dist(p, q) - dist(q, r); }
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,15 @@ public:
|
||||||
: map(m), d(v)
|
: map(m), d(v)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
// Added as workaround for VC2017 with /arch:AVX to fix
|
||||||
|
// https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-I-95/QP_solver/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Release-64bits.gz
|
||||||
|
Map_with_default& operator=(const Map_with_default& other)
|
||||||
|
{
|
||||||
|
map = other.map;
|
||||||
|
d = other.d;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
// operator()
|
// operator()
|
||||||
const mapped_type& operator() (key_type n) const {
|
const mapped_type& operator() (key_type n) const {
|
||||||
CGAL_qpe_precondition (map != 0);
|
CGAL_qpe_precondition (map != 0);
|
||||||
|
|
|
||||||
|
|
@ -451,6 +451,19 @@ public:
|
||||||
Binary_compose_2(const Op1& x, const Op2& y, const Op3& z)
|
Binary_compose_2(const Op1& x, const Op2& y, const Op3& z)
|
||||||
: op1(x), op2(y), op3(z) {}
|
: op1(x), op2(y), op3(z) {}
|
||||||
|
|
||||||
|
// Added as workaround for VC2017 with /arch:AVX to fix
|
||||||
|
// https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-I-95/Polytope_distance_d/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Release-64bits.gz
|
||||||
|
Binary_compose_2(const Binary_compose_2& other)
|
||||||
|
: op1(other.op1), op2(other.op2), op3(other.op3) {}
|
||||||
|
|
||||||
|
Binary_compose_2& operator=(const Binary_compose_2& other)
|
||||||
|
{
|
||||||
|
op1 = other.op1;
|
||||||
|
op2 = other.op2;
|
||||||
|
op3 = other.op3;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const first_argument_type& x,
|
operator()(const first_argument_type& x,
|
||||||
const second_argument_type& y) const
|
const second_argument_type& y) const
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,21 @@ template < class FT> class Plane_separator {
|
||||||
|
|
||||||
Plane_separator(const int d, const FT& v) :
|
Plane_separator(const int d, const FT& v) :
|
||||||
cutting_dim(d), cutting_val(v) {}
|
cutting_dim(d), cutting_val(v) {}
|
||||||
|
|
||||||
explicit Plane_separator() : cutting_dim(0), cutting_val(0) {}
|
explicit Plane_separator() : cutting_dim(0), cutting_val(0) {}
|
||||||
|
|
||||||
|
// Added as workaround for VC2017 with /arch:AVX to fix
|
||||||
|
// https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-I-95/Spatial_searching/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Release-64bits.gz
|
||||||
|
Plane_separator& operator=(const Plane_separator& ps)
|
||||||
|
{
|
||||||
|
cutting_dim = ps.cutting_dim;
|
||||||
|
cutting_val = ps.cutting_val;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template < class FT>
|
template < class FT>
|
||||||
std::ostream& operator<< (std::ostream& s, Plane_separator<FT>& x) {
|
std::ostream& operator<< (std::ostream& s, Plane_separator<FT>& x) {
|
||||||
s << "\n Separator coordinate: " << x.cutting_dimension() <<
|
s << "\n Separator coordinate: " << x.cutting_dimension() <<
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue