Skip to content

Commit 4c3d959

Browse files
committed
Work around boost::math 1.85.0 issue with gcc < 13.3
1 parent 6281f3f commit 4c3d959

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/interpolation/TPSpline.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,21 @@
2828
//#define FUNC_DEBUG
2929
#include <func/func.hpp>
3030
#include "TPSBasis.hpp"
31+
#include <boost/predef.h>
3132

3233
// Build FunC lookup table for -(log(x)+gamma+gsl_sf_expint_E1(x))
3334

3435
// hardcoded error of 1e-8
35-
//static func::FailureProofTable<func::UniformEqSpaceInterpTable<3,double>,double> TPSBasis_LUT({TPSBasis<double>}, {1e-5, 32, 0.11111});
36+
// There is a compiler bug fixed in gcc that interfers with boost 1.85.0 math and frounding-math (needed for cgal)
37+
// so use the uniform spaced LUT to avoid the proplematic call
38+
// bug is fixed in 12.4/13.3/14.0
39+
// see https://github.com/boostorg/math/issues/1133 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109359
40+
#if BOOST_COMP_GNUC && BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(13,3,0)
41+
static func::FailureProofTable<func::UniformEqSpaceInterpTable<3,double>,double> TPSBasis_LUT({TPSBasis<double>}, {1e-5, 32, 0.11111});
42+
#else
3643
static func::FailureProofTable<func::NonUniformEqSpaceInterpTable<3,double>,double> TPSBasis_LUT({FUNC_SET_F(TPSBasis,double)}, {1e-5, 32, 0.154207});
44+
#endif
45+
3746
//static func::DirectEvaluation<double> TPSBasis_LUT({OLD_TPSBasis<double>}, 1e-8, 6500);
3847

3948

0 commit comments

Comments
 (0)