From d46bacb6bb97048d23987693df92032386f60ab3 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Mon, 28 Sep 2015 10:40:41 -0700 Subject: Call numext::mini instead of std::min in several places. --- Eigen/src/Core/MathFunctions.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'Eigen/src') diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index c795149b8..45cff0c65 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -314,8 +314,6 @@ struct hypot_impl typedef typename NumTraits::Real RealScalar; static inline RealScalar run(const Scalar& x, const Scalar& y) { - EIGEN_USING_STD_MATH(max); - EIGEN_USING_STD_MATH(min); EIGEN_USING_STD_MATH(abs); EIGEN_USING_STD_MATH(sqrt); RealScalar _x = abs(x); @@ -607,8 +605,6 @@ struct random_default_impl { static inline Scalar run(const Scalar& x, const Scalar& y) { - using std::max; - using std::min; typedef typename conditional::IsSigned,std::ptrdiff_t,std::size_t>::type ScalarX; if(y EIGEN_DEVICE_FUNC static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec) { - EIGEN_USING_STD_MATH(min); EIGEN_USING_STD_MATH(abs); - return abs(x - y) <= (min)(abs(x), abs(y)) * prec; + return abs(x - y) <= numext::mini(abs(x), abs(y)) * prec; } EIGEN_DEVICE_FUNC static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar& prec) @@ -971,8 +966,7 @@ struct scalar_fuzzy_default_impl } static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec) { - EIGEN_USING_STD_MATH(min); - return numext::abs2(x - y) <= (min)(numext::abs2(x), numext::abs2(y)) * prec * prec; + return numext::abs2(x - y) <= numext::mini(numext::abs2(x), numext::abs2(y)) * prec * prec; } }; -- cgit v1.2.3