10 #ifndef EIGEN_MATHFUNCTIONS_H 11 #define EIGEN_MATHFUNCTIONS_H 15 #define EIGEN_PI 3.141592653589793238462643383279502884197169399375105820974944592307816406L 22 #if EIGEN_OS_WINCE && EIGEN_COMP_MSVC && EIGEN_COMP_MSVC<=1500 23 long abs(
long x) {
return (labs(x)); }
24 double abs(
double x) {
return (fabs(x)); }
25 float abs(
float x) {
return (fabsf(x)); }
26 long double abs(
long double x) {
return (fabsl(x)); }
51 template<
typename T,
typename dummy =
void>
52 struct global_math_functions_filtering_base
57 template<
typename T>
struct always_void {
typedef void type; };
60 struct global_math_functions_filtering_base
62 typename always_void<typename T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl>::type
65 typedef typename T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl type;
68 #define EIGEN_MATHFUNC_IMPL(func, scalar) Eigen::internal::func##_impl<typename Eigen::internal::global_math_functions_filtering_base<scalar>::type> 69 #define EIGEN_MATHFUNC_RETVAL(func, scalar) typename Eigen::internal::func##_retval<typename Eigen::internal::global_math_functions_filtering_base<scalar>::type>::type 75 template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
76 struct real_default_impl
80 static inline RealScalar run(
const Scalar& x)
86 template<
typename Scalar>
87 struct real_default_impl<Scalar,true>
91 static inline RealScalar run(
const Scalar& x)
98 template<
typename Scalar>
struct real_impl : real_default_impl<Scalar> {};
102 struct real_impl<std::complex<T> >
104 typedef T RealScalar;
106 static inline T run(
const std::complex<T>& x)
113 template<
typename Scalar>
123 template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
124 struct imag_default_impl
128 static inline RealScalar run(
const Scalar&)
130 return RealScalar(0);
134 template<
typename Scalar>
135 struct imag_default_impl<Scalar,true>
139 static inline RealScalar run(
const Scalar& x)
146 template<
typename Scalar>
struct imag_impl : imag_default_impl<Scalar> {};
150 struct imag_impl<std::complex<T> >
152 typedef T RealScalar;
154 static inline T run(
const std::complex<T>& x)
161 template<
typename Scalar>
171 template<
typename Scalar>
176 static inline RealScalar& run(Scalar& x)
178 return reinterpret_cast<RealScalar*
>(&x)[0];
181 static inline const RealScalar& run(
const Scalar& x)
183 return reinterpret_cast<const RealScalar*
>(&x)[0];
187 template<
typename Scalar>
188 struct real_ref_retval
197 template<
typename Scalar,
bool IsComplex>
198 struct imag_ref_default_impl
202 static inline RealScalar& run(Scalar& x)
204 return reinterpret_cast<RealScalar*
>(&x)[1];
207 static inline const RealScalar& run(
const Scalar& x)
209 return reinterpret_cast<RealScalar*
>(&x)[1];
213 template<
typename Scalar>
214 struct imag_ref_default_impl<Scalar, false>
217 static inline Scalar run(Scalar&)
222 static inline const Scalar run(
const Scalar&)
228 template<
typename Scalar>
229 struct imag_ref_impl : imag_ref_default_impl<Scalar, NumTraits<Scalar>::IsComplex> {};
231 template<
typename Scalar>
232 struct imag_ref_retval
241 template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
245 static inline Scalar run(
const Scalar& x)
251 template<
typename Scalar>
252 struct conj_impl<Scalar,true>
255 static inline Scalar run(
const Scalar& x)
262 template<
typename Scalar>
272 template<
typename Scalar,
bool IsComplex>
273 struct abs2_impl_default
277 static inline RealScalar run(
const Scalar& x)
283 template<
typename Scalar>
284 struct abs2_impl_default<Scalar, true>
288 static inline RealScalar run(
const Scalar& x)
294 template<
typename Scalar>
299 static inline RealScalar run(
const Scalar& x)
301 return abs2_impl_default<Scalar,NumTraits<Scalar>::IsComplex>::run(x);
305 template<
typename Scalar>
315 template<
typename Scalar,
bool IsComplex>
316 struct norm1_default_impl
320 static inline RealScalar run(
const Scalar& x)
322 EIGEN_USING_STD_MATH(
abs);
327 template<
typename Scalar>
328 struct norm1_default_impl<Scalar, false>
331 static inline Scalar run(
const Scalar& x)
333 EIGEN_USING_STD_MATH(
abs);
338 template<
typename Scalar>
339 struct norm1_impl : norm1_default_impl<Scalar, NumTraits<Scalar>::IsComplex> {};
341 template<
typename Scalar>
351 template<
typename Scalar>
355 static inline RealScalar run(
const Scalar& x,
const Scalar& y)
357 EIGEN_USING_STD_MATH(
abs);
358 EIGEN_USING_STD_MATH(
sqrt);
359 RealScalar _x =
abs(x);
360 RealScalar _y =
abs(y);
372 if(p==RealScalar(0))
return RealScalar(0);
373 return p *
sqrt(RealScalar(1) + qp*qp);
377 template<
typename Scalar>
387 template<
typename OldType,
typename NewType>
391 static inline NewType run(
const OldType& x)
393 return static_cast<NewType
>(x);
399 template<
typename OldType,
typename NewType>
401 inline NewType
cast(
const OldType& x)
403 return cast_impl<OldType, NewType>::run(x);
410 #if EIGEN_HAS_CXX11_MATH 411 template<
typename Scalar>
413 static inline Scalar run(
const Scalar& x)
421 template<
typename Scalar>
424 static inline Scalar run(
const Scalar& x)
427 EIGEN_USING_STD_MATH(
floor);
428 EIGEN_USING_STD_MATH(
ceil);
429 return (x > Scalar(0)) ?
floor(x + Scalar(0.5)) :
ceil(x - Scalar(0.5));
434 template<
typename Scalar>
444 #if EIGEN_HAS_CXX11_MATH 445 template<
typename Scalar>
447 static inline Scalar run(
const Scalar& x)
449 EIGEN_USING_STD_MATH(
arg);
454 template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
455 struct arg_default_impl
459 static inline RealScalar run(
const Scalar& x)
461 return (x < Scalar(0)) ? Scalar(
EIGEN_PI) : Scalar(0); }
464 template<
typename Scalar>
465 struct arg_default_impl<Scalar,true>
469 static inline RealScalar run(
const Scalar& x)
471 EIGEN_USING_STD_MATH(
arg);
476 template<
typename Scalar>
struct arg_impl : arg_default_impl<Scalar> {};
479 template<
typename Scalar>
489 namespace std_fallback {
492 template<
typename Scalar>
493 EIGEN_DEVICE_FUNC
inline Scalar
log1p(
const Scalar& x) {
496 EIGEN_USING_STD_MATH(
log);
497 Scalar x1p = RealScalar(1) + x;
498 return ( x1p == Scalar(1) ) ? x : x * (
log(x1p) / (x1p - RealScalar(1)) );
502 template<
typename Scalar>
504 static inline Scalar run(
const Scalar& x)
507 #if EIGEN_HAS_CXX11_MATH 516 template<
typename Scalar>
530 typedef typename ScalarBinaryOpTraits<ScalarX,ScalarY,internal::scalar_pow_op<ScalarX,ScalarY> >::ReturnType result_type;
531 static EIGEN_DEVICE_FUNC
inline result_type run(
const ScalarX& x,
const ScalarY& y)
533 EIGEN_USING_STD_MATH(
pow);
538 template<
typename ScalarX,
typename ScalarY>
539 struct pow_impl<ScalarX,ScalarY, true>
541 typedef ScalarX result_type;
542 static EIGEN_DEVICE_FUNC
inline ScalarX run(ScalarX x, ScalarY y)
562 template<
typename Scalar,
565 struct random_default_impl {};
567 template<
typename Scalar>
568 struct random_impl : random_default_impl<Scalar, NumTraits<Scalar>::IsComplex, NumTraits<Scalar>::IsInteger> {};
570 template<
typename Scalar>
576 template<
typename Scalar>
inline EIGEN_MATHFUNC_RETVAL(random, Scalar) random(
const Scalar& x,
const Scalar& y);
579 template<
typename Scalar>
580 struct random_default_impl<Scalar, false, false>
582 static inline Scalar run(
const Scalar& x,
const Scalar& y)
584 return x + (y-x) * Scalar(std::rand()) / Scalar(RAND_MAX);
586 static inline Scalar run()
593 meta_floor_log2_terminate,
594 meta_floor_log2_move_up,
595 meta_floor_log2_move_down,
596 meta_floor_log2_bogus
599 template<
unsigned int n,
int lower,
int upper>
struct meta_floor_log2_selector
601 enum { middle = (lower + upper) / 2,
602 value = (upper <= lower + 1) ? int(meta_floor_log2_terminate)
603 : (n < (1 << middle)) ? int(meta_floor_log2_move_down)
604 : (n==0) ?
int(meta_floor_log2_bogus)
605 : int(meta_floor_log2_move_up)
609 template<
unsigned int n,
611 int upper =
sizeof(
unsigned int) * CHAR_BIT - 1,
612 int selector = meta_floor_log2_selector<n, lower, upper>::value>
613 struct meta_floor_log2 {};
615 template<
unsigned int n,
int lower,
int upper>
616 struct meta_floor_log2<n, lower, upper, meta_floor_log2_move_down>
618 enum { value = meta_floor_log2<n, lower, meta_floor_log2_selector<n, lower, upper>::middle>::value };
621 template<
unsigned int n,
int lower,
int upper>
622 struct meta_floor_log2<n, lower, upper, meta_floor_log2_move_up>
624 enum { value = meta_floor_log2<n, meta_floor_log2_selector<n, lower, upper>::middle, upper>::value };
627 template<
unsigned int n,
int lower,
int upper>
628 struct meta_floor_log2<n, lower, upper, meta_floor_log2_terminate>
630 enum { value = (n >= ((
unsigned int)(1) << (lower+1))) ? lower+1 : lower };
633 template<
unsigned int n,
int lower,
int upper>
634 struct meta_floor_log2<n, lower, upper, meta_floor_log2_bogus>
639 template<
typename Scalar>
640 struct random_default_impl<Scalar, false, true>
642 static inline Scalar run(
const Scalar& x,
const Scalar& y)
644 typedef typename conditional<NumTraits<Scalar>::IsSigned,std::ptrdiff_t,std::size_t>::type ScalarX;
649 std::size_t range = ScalarX(y)-ScalarX(x);
650 std::size_t offset = 0;
652 std::size_t divisor = 1;
653 std::size_t multiplier = 1;
654 if(range<RAND_MAX) divisor = (std::size_t(RAND_MAX)+1)/(range+1);
655 else multiplier = 1 + range/(std::size_t(RAND_MAX)+1);
657 offset = (std::size_t(std::rand()) * multiplier) / divisor;
658 }
while (offset > range);
659 return Scalar(ScalarX(x) + offset);
662 static inline Scalar run()
664 #ifdef EIGEN_MAKING_DOCS 667 enum { rand_bits = meta_floor_log2<(unsigned int)(RAND_MAX)+1>::value,
668 scalar_bits =
sizeof(Scalar) * CHAR_BIT,
672 return Scalar((std::rand() >> shift) - offset);
677 template<
typename Scalar>
678 struct random_default_impl<Scalar, true, false>
680 static inline Scalar run(
const Scalar& x,
const Scalar& y)
682 return Scalar(random(
real(x),
real(y)),
685 static inline Scalar run()
688 return Scalar(random<RealScalar>(), random<RealScalar>());
692 template<
typename Scalar>
698 template<
typename Scalar>
707 #if (EIGEN_HAS_CXX11_MATH && !(EIGEN_COMP_GNUC_STRICT && __FINITE_MATH_ONLY__)) || (EIGEN_COMP_MSVC>=1800) || (EIGEN_COMP_CLANG) 708 #define EIGEN_USE_STD_FPCLASSIFY 1 710 #define EIGEN_USE_STD_FPCLASSIFY 0 715 typename internal::enable_if<internal::is_integral<T>::value,
bool>::type
716 isnan_impl(
const T&) {
return false; }
720 typename internal::enable_if<internal::is_integral<T>::value,
bool>::type
721 isinf_impl(
const T&) {
return false; }
725 typename internal::enable_if<internal::is_integral<T>::value,
bool>::type
726 isfinite_impl(
const T&) {
return true; }
731 isfinite_impl(
const T& x)
735 #elif EIGEN_USE_STD_FPCLASSIFY 739 return x<=NumTraits<T>::highest() && x>=NumTraits<T>::lowest();
746 isinf_impl(
const T& x)
750 #elif EIGEN_USE_STD_FPCLASSIFY 754 return x>NumTraits<T>::highest() || x<NumTraits<T>::lowest();
761 isnan_impl(
const T& x)
765 #elif EIGEN_USE_STD_FPCLASSIFY 773 #if (!EIGEN_USE_STD_FPCLASSIFY) 777 template<
typename T> EIGEN_DEVICE_FUNC
bool isinf_msvc_helper(T x)
779 return _fpclass(x)==_FPCLASS_NINF || _fpclass(x)==_FPCLASS_PINF;
783 EIGEN_DEVICE_FUNC
inline bool isnan_impl(
const long double& x) {
return _isnan(x)!=0; }
784 EIGEN_DEVICE_FUNC
inline bool isnan_impl(
const double& x) {
return _isnan(x)!=0; }
785 EIGEN_DEVICE_FUNC
inline bool isnan_impl(
const float& x) {
return _isnan(x)!=0; }
787 EIGEN_DEVICE_FUNC
inline bool isinf_impl(
const long double& x) {
return isinf_msvc_helper(x); }
788 EIGEN_DEVICE_FUNC
inline bool isinf_impl(
const double& x) {
return isinf_msvc_helper(x); }
789 EIGEN_DEVICE_FUNC
inline bool isinf_impl(
const float& x) {
return isinf_msvc_helper(x); }
791 #elif (defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ && EIGEN_COMP_GNUC) 793 #if EIGEN_GNUC_AT_LEAST(5,0) 794 #define EIGEN_TMP_NOOPT_ATTRIB EIGEN_DEVICE_FUNC inline __attribute__((optimize("no-finite-math-only"))) 798 #define EIGEN_TMP_NOOPT_ATTRIB EIGEN_DEVICE_FUNC inline __attribute__((noinline,optimize("no-finite-math-only"))) 801 template<> EIGEN_TMP_NOOPT_ATTRIB
bool isnan_impl(
const long double& x) {
return __builtin_isnan(x); }
802 template<> EIGEN_TMP_NOOPT_ATTRIB
bool isnan_impl(
const double& x) {
return __builtin_isnan(x); }
803 template<> EIGEN_TMP_NOOPT_ATTRIB
bool isnan_impl(
const float& x) {
return __builtin_isnan(x); }
804 template<> EIGEN_TMP_NOOPT_ATTRIB
bool isinf_impl(
const double& x) {
return __builtin_isinf(x); }
805 template<> EIGEN_TMP_NOOPT_ATTRIB
bool isinf_impl(
const float& x) {
return __builtin_isinf(x); }
806 template<> EIGEN_TMP_NOOPT_ATTRIB
bool isinf_impl(
const long double& x) {
return __builtin_isinf(x); }
808 #undef EIGEN_TMP_NOOPT_ATTRIB 815 template<
typename T> EIGEN_DEVICE_FUNC
bool isfinite_impl(
const std::complex<T>& x);
816 template<
typename T> EIGEN_DEVICE_FUNC
bool isnan_impl(
const std::complex<T>& x);
817 template<
typename T> EIGEN_DEVICE_FUNC
bool isinf_impl(
const std::complex<T>& x);
829 #ifndef __CUDA_ARCH__ 834 EIGEN_USING_STD_MATH(
min);
842 EIGEN_USING_STD_MATH(
max);
850 return y < x ? y : x;
862 return x < y ? y : x;
873 template<
typename Scalar>
880 template<
typename Scalar>
884 return internal::real_ref_impl<Scalar>::run(x);
887 template<
typename Scalar>
894 template<
typename Scalar>
901 template<
typename Scalar>
908 template<
typename Scalar>
912 return internal::imag_ref_impl<Scalar>::run(x);
915 template<
typename Scalar>
922 template<
typename Scalar>
929 template<
typename Scalar>
936 template<
typename Scalar>
943 template<
typename Scalar>
950 template<
typename Scalar>
959 float log1p(
const float &x) { return ::log1pf(x); }
965 template<
typename ScalarX,
typename ScalarY>
967 inline typename internal::pow_impl<ScalarX,ScalarY>::result_type
pow(
const ScalarX& x,
const ScalarY& y)
969 return internal::pow_impl<ScalarX,ScalarY>::run(x, y);
972 template<
typename T> EIGEN_DEVICE_FUNC bool (
isnan) (
const T &x) {
return internal::isnan_impl(x); }
973 template<
typename T> EIGEN_DEVICE_FUNC bool (
isinf) (
const T &x) {
return internal::isinf_impl(x); }
974 template<
typename T> EIGEN_DEVICE_FUNC bool (
isfinite)(
const T &x) {
return internal::isfinite_impl(x); }
976 template<
typename Scalar>
985 T (
floor)(
const T& x)
987 EIGEN_USING_STD_MATH(
floor);
993 float floor(
const float &x) { return ::floorf(x); }
1001 T (
ceil)(
const T& x)
1003 EIGEN_USING_STD_MATH(
ceil);
1009 float ceil(
const float &x) { return ::ceilf(x); }
1018 inline int log2(
int x)
1022 static const int table[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 };
1028 return table[(v * 0x07C4ACDDU) >> 27];
1039 template<
typename T>
1043 EIGEN_USING_STD_MATH(
sqrt);
1047 template<
typename T>
1050 EIGEN_USING_STD_MATH(
log);
1056 float log(
const float &x) { return ::logf(x); }
1062 template<
typename T>
1065 EIGEN_USING_STD_MATH(
abs);
1071 float abs(
const float &x) { return ::fabsf(x); }
1074 double abs(
const double &x) { return ::fabs(x); }
1077 float abs(
const std::complex<float>& x) {
1078 return ::hypotf(x.real(), x.imag());
1082 double abs(
const std::complex<double>& x) {
1083 return ::hypot(x.real(), x.imag());
1087 template<
typename T>
1090 EIGEN_USING_STD_MATH(
exp);
1096 float exp(
const float &x) { return ::expf(x); }
1102 template<
typename T>
1105 EIGEN_USING_STD_MATH(
cos);
1111 float cos(
const float &x) { return ::cosf(x); }
1117 template<
typename T>
1120 EIGEN_USING_STD_MATH(
sin);
1126 float sin(
const float &x) { return ::sinf(x); }
1132 template<
typename T>
1135 EIGEN_USING_STD_MATH(
tan);
1141 float tan(
const float &x) { return ::tanf(x); }
1147 template<
typename T>
1149 T
acos(
const T &x) {
1150 EIGEN_USING_STD_MATH(
acos);
1156 float acos(
const float &x) { return ::acosf(x); }
1162 template<
typename T>
1164 T
asin(
const T &x) {
1165 EIGEN_USING_STD_MATH(
asin);
1171 float asin(
const float &x) { return ::asinf(x); }
1177 template<
typename T>
1179 T
atan(
const T &x) {
1180 EIGEN_USING_STD_MATH(
atan);
1186 float atan(
const float &x) { return ::atanf(x); }
1193 template<
typename T>
1195 T
cosh(
const T &x) {
1196 EIGEN_USING_STD_MATH(
cosh);
1202 float cosh(
const float &x) { return ::coshf(x); }
1208 template<
typename T>
1210 T
sinh(
const T &x) {
1211 EIGEN_USING_STD_MATH(
sinh);
1217 float sinh(
const float &x) { return ::sinhf(x); }
1223 template<
typename T>
1225 T
tanh(
const T &x) {
1226 EIGEN_USING_STD_MATH(
tanh);
1230 #if (!defined(__CUDACC__)) && EIGEN_FAST_MATH 1237 float tanh(
const float &x) { return ::tanhf(x); }
1243 template <
typename T>
1245 T fmod(
const T& a,
const T& b) {
1246 EIGEN_USING_STD_MATH(fmod);
1253 float fmod(
const float& a,
const float& b) {
1254 return ::fmodf(a, b);
1259 double fmod(
const double& a,
const double& b) {
1260 return ::fmod(a, b);
1268 template<
typename T>
1269 EIGEN_DEVICE_FUNC
bool isfinite_impl(
const std::complex<T>& x)
1274 template<
typename T>
1275 EIGEN_DEVICE_FUNC
bool isnan_impl(
const std::complex<T>& x)
1280 template<
typename T>
1281 EIGEN_DEVICE_FUNC
bool isinf_impl(
const std::complex<T>& x)
1290 template<
typename Scalar,
1293 struct scalar_fuzzy_default_impl {};
1295 template<
typename Scalar>
1296 struct scalar_fuzzy_default_impl<Scalar, false, false>
1299 template<
typename OtherScalar> EIGEN_DEVICE_FUNC
1300 static inline bool isMuchSmallerThan(
const Scalar& x,
const OtherScalar& y,
const RealScalar& prec)
1305 static inline bool isApprox(
const Scalar& x,
const Scalar& y,
const RealScalar& prec)
1310 static inline bool isApproxOrLessThan(
const Scalar& x,
const Scalar& y,
const RealScalar& prec)
1312 return x <= y || isApprox(x, y, prec);
1316 template<
typename Scalar>
1317 struct scalar_fuzzy_default_impl<Scalar, false, true>
1320 template<
typename OtherScalar> EIGEN_DEVICE_FUNC
1321 static inline bool isMuchSmallerThan(
const Scalar& x,
const Scalar&,
const RealScalar&)
1323 return x == Scalar(0);
1326 static inline bool isApprox(
const Scalar& x,
const Scalar& y,
const RealScalar&)
1331 static inline bool isApproxOrLessThan(
const Scalar& x,
const Scalar& y,
const RealScalar&)
1337 template<
typename Scalar>
1338 struct scalar_fuzzy_default_impl<Scalar, true, false>
1341 template<
typename OtherScalar> EIGEN_DEVICE_FUNC
1342 static inline bool isMuchSmallerThan(
const Scalar& x,
const OtherScalar& y,
const RealScalar& prec)
1347 static inline bool isApprox(
const Scalar& x,
const Scalar& y,
const RealScalar& prec)
1353 template<
typename Scalar>
1354 struct scalar_fuzzy_impl : scalar_fuzzy_default_impl<Scalar, NumTraits<Scalar>::IsComplex, NumTraits<Scalar>::IsInteger> {};
1356 template<
typename Scalar,
typename OtherScalar> EIGEN_DEVICE_FUNC
1357 inline bool isMuchSmallerThan(
const Scalar& x,
const OtherScalar& y,
1360 return scalar_fuzzy_impl<Scalar>::template isMuchSmallerThan<OtherScalar>(x, y, precision);
1363 template<
typename Scalar> EIGEN_DEVICE_FUNC
1364 inline bool isApprox(
const Scalar& x,
const Scalar& y,
1367 return scalar_fuzzy_impl<Scalar>::isApprox(x, y, precision);
1370 template<
typename Scalar> EIGEN_DEVICE_FUNC
1371 inline bool isApproxOrLessThan(
const Scalar& x,
const Scalar& y,
1374 return scalar_fuzzy_impl<Scalar>::isApproxOrLessThan(x, y, precision);
1381 template<>
struct random_impl<bool>
1383 static inline bool run()
1385 return random<int>(0,1)==0 ?
false :
true;
1389 template<>
struct scalar_fuzzy_impl<bool>
1391 typedef bool RealScalar;
1393 template<
typename OtherScalar> EIGEN_DEVICE_FUNC
1394 static inline bool isMuchSmallerThan(
const bool& x,
const bool&,
const bool&)
1400 static inline bool isApprox(
bool x,
bool y,
bool)
1406 static inline bool isApproxOrLessThan(
const bool& x,
const bool& y,
const bool&)
1418 #endif // EIGEN_MATHFUNCTIONS_H EIGEN_DEVICE_FUNC const Log1pReturnType log1p() const
#define EIGEN_ALWAYS_INLINE
EIGEN_DEVICE_FUNC const CosReturnType cos() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isfinite(const half &a)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half pow(const half &a, const half &b)
#define EIGEN_NOT_A_MACRO
EIGEN_DEVICE_FUNC RealReturnType real() const
EIGEN_DEVICE_FUNC const TanhReturnType tanh() const
#define EIGEN_PLAIN_ENUM_MAX(a, b)
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
T generic_fast_tanh_float(const T &a_x)
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isinf(const half &a)
EIGEN_DEVICE_FUNC const SinhReturnType sinh() const
EIGEN_DEVICE_FUNC const LogReturnType log() const
EIGEN_DEVICE_FUNC const AtanReturnType atan() const
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const AbsReturnType abs() const
EIGEN_DEVICE_FUNC const FloorReturnType floor() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Abs2ReturnType abs2() const
#define EIGEN_MATHFUNC_IMPL(func, scalar)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
#define EIGEN_MATHFUNC_RETVAL(func, scalar)
EIGEN_DEVICE_FUNC const AcosReturnType acos() const
EIGEN_DEVICE_FUNC CastXpr< NewType >::Type cast() const
#define EIGEN_PLAIN_ENUM_MIN(a, b)
int64_t max(int64_t a, const int b)
EIGEN_DEVICE_FUNC const TanReturnType tan() const
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isnan(const half &a)
EIGEN_DEVICE_FUNC const CoshReturnType cosh() const
EIGEN_DEVICE_FUNC const AsinReturnType asin() const
EIGEN_DEVICE_FUNC const CeilReturnType ceil() const
EIGEN_DEVICE_FUNC const SinReturnType sin() const
EIGEN_DEVICE_FUNC const RoundReturnType round() const