Workaround gcc issue with -O3 and the i387 FPU.

This commit is contained in:
Gael Guennebaud 2015-12-10 21:33:43 +01:00
parent 7ad1aaec1d
commit 46d2f6cd78

View File

@ -18,7 +18,9 @@ template<typename T> T negate(const T& x) { return -x; }
}
}
template<typename Scalar> bool isApproxAbs(const Scalar& a, const Scalar& b, const typename NumTraits<Scalar>::Real& refvalue)
// NOTE: we disbale inlining for this function to workaround a GCC issue when using -O3 and the i387 FPU.
template<typename Scalar> EIGEN_DONT_INLINE
bool isApproxAbs(const Scalar& a, const Scalar& b, const typename NumTraits<Scalar>::Real& refvalue)
{
return internal::isMuchSmallerThan(a-b, refvalue);
}