From 0d0984556287c3cbb4804b6e55fa1eca3b569527 Mon Sep 17 00:00:00 2001 From: Nicolas Mellado Date: Sat, 11 Jul 2015 20:11:36 +0200 Subject: Revert files to remove EIGEN_USING_NUMEXT_MATH --- Eigen/Core | 6 ------ Eigen/src/Core/functors/UnaryFunctors.h | 36 ++++++--------------------------- 2 files changed, 6 insertions(+), 36 deletions(-) (limited to 'Eigen') diff --git a/Eigen/Core b/Eigen/Core index 7ad454c56..de94b5b75 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -42,12 +42,6 @@ #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC; #endif -#if defined(__CUDA_ARCH__) - #define EIGEN_USING_NUMEXT_MATH(FUNC) using ::FUNC; -#else - #define EIGEN_USING_NUMEXT_MATH(FUNC) using numext::FUNC; -#endif - #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) #define EIGEN_EXCEPTIONS #endif diff --git a/Eigen/src/Core/functors/UnaryFunctors.h b/Eigen/src/Core/functors/UnaryFunctors.h index c61a899c5..6ce7ff46b 100644 --- a/Eigen/src/Core/functors/UnaryFunctors.h +++ b/Eigen/src/Core/functors/UnaryFunctors.h @@ -533,11 +533,7 @@ struct functor_traits > */ template struct scalar_round_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_round_op) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const - { - EIGEN_USING_NUMEXT_MATH(round); - return round(a); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { using numext::round; return round(a); } typedef typename packet_traits::type Packet; inline Packet packetOp(const Packet& a) const { return internal::pround(a); } }; @@ -556,11 +552,7 @@ struct functor_traits > */ template struct scalar_floor_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_floor_op) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const - { - EIGEN_USING_NUMEXT_MATH(floor); - return floor(a); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { using numext::floor; return floor(a); } typedef typename packet_traits::type Packet; inline Packet packetOp(const Packet& a) const { return internal::pfloor(a); } }; @@ -579,11 +571,7 @@ struct functor_traits > */ template struct scalar_ceil_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_ceil_op) - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const - { - EIGEN_USING_NUMEXT_MATH(ceil); - return ceil(a); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { using numext::ceil; return ceil(a); } typedef typename packet_traits::type Packet; inline Packet packetOp(const Packet& a) const { return internal::pceil(a); } }; @@ -603,11 +591,7 @@ struct functor_traits > template struct scalar_isnan_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_isnan_op) typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const - { - EIGEN_USING_NUMEXT_MATH(isnan); - return isnan(a); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { using numext::isnan; return isnan(a); } }; template struct functor_traits > @@ -625,11 +609,7 @@ struct functor_traits > template struct scalar_isinf_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_isinf_op) typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const - { - EIGEN_USING_NUMEXT_MATH(isinf); - return isinf(a); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { using numext::isinf; return isinf(a); } }; template struct functor_traits > @@ -647,11 +627,7 @@ struct functor_traits > template struct scalar_isfinite_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_isfinite_op) typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const - { - EIGEN_USING_NUMEXT_MATH(isfinite); - return isfinite(a); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { using numext::isfinite; return isfinite(a); } }; template struct functor_traits > -- cgit v1.2.3