mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
Revert files to remove EIGEN_USING_NUMEXT_MATH
This commit is contained in:
parent
20b96025fd
commit
0d09845562
@ -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
|
||||
|
@ -533,11 +533,7 @@ struct functor_traits<scalar_cube_op<Scalar> >
|
||||
*/
|
||||
template<typename Scalar> 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<Scalar>::type Packet;
|
||||
inline Packet packetOp(const Packet& a) const { return internal::pround(a); }
|
||||
};
|
||||
@ -556,11 +552,7 @@ struct functor_traits<scalar_round_op<Scalar> >
|
||||
*/
|
||||
template<typename Scalar> 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<Scalar>::type Packet;
|
||||
inline Packet packetOp(const Packet& a) const { return internal::pfloor(a); }
|
||||
};
|
||||
@ -579,11 +571,7 @@ struct functor_traits<scalar_floor_op<Scalar> >
|
||||
*/
|
||||
template<typename Scalar> 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<Scalar>::type Packet;
|
||||
inline Packet packetOp(const Packet& a) const { return internal::pceil(a); }
|
||||
};
|
||||
@ -603,11 +591,7 @@ struct functor_traits<scalar_ceil_op<Scalar> >
|
||||
template<typename Scalar> 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<typename Scalar>
|
||||
struct functor_traits<scalar_isnan_op<Scalar> >
|
||||
@ -625,11 +609,7 @@ struct functor_traits<scalar_isnan_op<Scalar> >
|
||||
template<typename Scalar> 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<typename Scalar>
|
||||
struct functor_traits<scalar_isinf_op<Scalar> >
|
||||
@ -647,11 +627,7 @@ struct functor_traits<scalar_isinf_op<Scalar> >
|
||||
template<typename Scalar> 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<typename Scalar>
|
||||
struct functor_traits<scalar_isfinite_op<Scalar> >
|
||||
|
Loading…
Reference in New Issue
Block a user