mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-01 08:14:10 +08:00
Update MathFunctions/SpecialFunctions with intelligent header guards.
This commit is contained in:
parent
5e7de771e3
commit
836e92a051
@ -946,12 +946,13 @@ T (floor)(const T& x)
|
||||
return floor(x);
|
||||
}
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
float floor(const float &x) { return ::floorf(x); }
|
||||
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
double floor(const double &x) { return ::floor(x); }
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
@ -999,12 +1000,13 @@ T log(const T &x) {
|
||||
return log(x);
|
||||
}
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
float log(const float &x) { return ::logf(x); }
|
||||
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
double log(const double &x) { return ::log(x); }
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
@ -1013,12 +1015,13 @@ T tan(const T &x) {
|
||||
return tan(x);
|
||||
}
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
float tan(const float &x) { return ::tanf(x); }
|
||||
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
double tan(const double &x) { return ::tan(x); }
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
@ -1027,12 +1030,13 @@ T abs(const T &x) {
|
||||
return abs(x);
|
||||
}
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
float abs(const float &x) { return ::fabsf(x); }
|
||||
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
double abs(const double &x) { return ::fabs(x); }
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
@ -1041,11 +1045,13 @@ T exp(const T &x) {
|
||||
return exp(x);
|
||||
}
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
float exp(const float &x) { return ::expf(x); }
|
||||
|
||||
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
double exp(const double &x) { return ::exp(x); }
|
||||
#endif
|
||||
|
||||
} // end namespace numext
|
||||
|
||||
|
@ -284,7 +284,7 @@ struct digamma_impl {
|
||||
bool negative;
|
||||
|
||||
const Scalar maxnum = NumTraits<Scalar>::infinity();
|
||||
const Scalar m_pi = 3.14159265358979323846;
|
||||
const Scalar m_pi = EIGEN_PI;
|
||||
|
||||
negative = 0;
|
||||
nz = 0.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user