11#ifndef EIGEN_MATHFUNCTIONS_H
12#define EIGEN_MATHFUNCTIONS_H
16#define EIGEN_PI 3.141592653589793238462643383279502884197169399375105820974944592307816406L
17#define EIGEN_LOG2E 1.442695040888963407359924681001892137426645954152985934135449406931109219L
18#define EIGEN_LN2 0.693147180559945309417232121458176568075500134360255254120680009493393621L
24#if EIGEN_OS_WINCE && EIGEN_COMP_MSVC && EIGEN_COMP_MSVC<=1500
25long abs(
long x) {
return (labs(x)); }
26double abs(
double x) {
return (
fabs(x)); }
27float abs(
float x) {
return (fabsf(x)); }
28long double abs(
long double x) {
return (fabsl(x)); }
53template<
typename T,
typename dummy =
void>
64 typename
always_void<typename T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl>
::type
67 typedef typename T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl
type;
70#define EIGEN_MATHFUNC_IMPL(func, scalar) Eigen::internal::func##_impl<typename Eigen::internal::global_math_functions_filtering_base<scalar>::type>
71#define EIGEN_MATHFUNC_RETVAL(func, scalar) typename Eigen::internal::func##_retval<typename Eigen::internal::global_math_functions_filtering_base<scalar>::type>::type
77template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
88template<
typename Scalar>
102#if defined(EIGEN_GPU_COMPILE_PHASE)
108 static inline T
run(
const std::complex<T>& x)
115template<
typename Scalar>
125template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
136template<
typename Scalar>
150#if defined(EIGEN_GPU_COMPILE_PHASE)
156 static inline T
run(
const std::complex<T>& x)
163template<
typename Scalar>
173template<
typename Scalar>
185 return reinterpret_cast<const RealScalar*
>(&x)[0];
189template<
typename Scalar>
199template<
typename Scalar,
bool IsComplex>
215template<
typename Scalar>
219 static inline Scalar
run(Scalar&)
224 static inline const Scalar
run(
const Scalar&)
230template<
typename Scalar>
233template<
typename Scalar>
243template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
247 static inline Scalar
run(
const Scalar& x)
253template<
typename Scalar>
257 static inline Scalar
run(
const Scalar& x)
264template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
267template<
typename Scalar>
277template<
typename Scalar,
bool IsComplex>
288template<
typename Scalar>
295 return x.real()*x.real() + x.imag()*x.imag();
299template<
typename Scalar>
310template<
typename Scalar>
320template<
typename Scalar>
342 return complex_sqrt<T>(x);
346template<
typename Scalar>
365 return complex_rsqrt<T>(x);
369template<
typename Scalar>
379template<
typename Scalar,
bool IsComplex>
382template<
typename Scalar>
390 return abs(x.real()) +
abs(x.imag());
394template<
typename Scalar>
398 static inline Scalar
run(
const Scalar& x)
405template<
typename Scalar>
408template<
typename Scalar>
420template<
typename Scalar>
430template<
typename OldType,
typename NewType,
typename EnableIf =
void>
434 static inline NewType
run(
const OldType& x)
436 return static_cast<NewType
>(x);
442template<
typename OldType,
typename NewType>
445 !NumTraits<OldType>::IsComplex && NumTraits<NewType>::IsComplex
449 static inline NewType
run(
const OldType& x)
452 return static_cast<NewType
>(
static_cast<NewReal
>(x));
458template<
typename OldType,
typename NewType>
460inline NewType
cast(
const OldType& x)
469template<
typename Scalar>
473 static inline Scalar
run(
const Scalar& x)
476#if EIGEN_HAS_CXX11_MATH
479 return Scalar(
round(x));
483#if !EIGEN_HAS_CXX11_MATH
484#if EIGEN_HAS_C99_MATH
487struct round_impl<float> {
489 static inline float run(
const float& x)
495template<
typename Scalar>
499 static inline Scalar
run(
const Scalar& x)
508 if (x >= limit || x <= -limit) {
511 return (x > Scalar(0)) ? Scalar(
floor(x + Scalar(0.5))) : Scalar(
ceil(x - Scalar(0.5)));
523template<
typename Scalar>
533template<
typename Scalar>
536 static inline Scalar
run(
const Scalar& x)
539#if EIGEN_HAS_CXX11_MATH
546#if !EIGEN_HAS_CXX11_MATH
550 static inline double run(
const double& x)
558 static inline float run(
const float& x)
565template<
typename Scalar>
577#if EIGEN_HAS_CXX11_MATH && (!EIGEN_COMP_MSVC || EIGEN_COMP_MSVC >= 1920)
579template<
typename Scalar,
585template<
typename Scalar>
591 #if defined(EIGEN_HIP_DEVICE_COMPILE)
602template<
typename Scalar>
603struct arg_default_impl<Scalar, false> {
612template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
623template<
typename Scalar>
637template<
typename Scalar>
648namespace std_fallback {
652 template<
typename Scalar>
662 Scalar um1 = u - RealScalar(1);
664 return RealScalar(-1);
668 Scalar logu =
log(u);
673template<
typename Scalar>
678 #if EIGEN_HAS_CXX11_MATH
687template<
typename Scalar>
700template<
typename Scalar>
705 return static_cast<Scalar
>(
log(x));
709template<
typename Scalar>
721namespace std_fallback {
724 template<
typename Scalar>
729 Scalar x1p = RealScalar(1) + x;
733 return (is_small ||
is_inf) ? x : x * (log_1p / (x1p - RealScalar(1)));
737template<
typename Scalar>
742 #if EIGEN_HAS_CXX11_MATH
752template <
typename RealScalar>
755 const std::complex<RealScalar>& x) {
761template<
typename Scalar>
783template<
typename ScalarX,
typename ScalarY>
807template<
typename Scalar,
812template<
typename Scalar>
815template<
typename Scalar>
824template<
typename Scalar>
827 static inline Scalar
run(
const Scalar& x,
const Scalar&
y)
829 return x + (
y-x) * Scalar(std::rand()) / Scalar(RAND_MAX);
831 static inline Scalar
run()
854template<
unsigned int n,
856 int upper =
sizeof(
unsigned int) * CHAR_BIT - 1,
860template<
unsigned int n,
int lower,
int upper>
866template<
unsigned int n,
int lower,
int upper>
872template<
unsigned int n,
int lower,
int upper>
875 enum {
value = (n >= ((
unsigned int)(1) << (lower+1))) ? lower+1 : lower };
878template<
unsigned int n,
int lower,
int upper>
884template<
typename Scalar>
887 static inline Scalar
run(
const Scalar& x,
const Scalar&
y)
896 typedef typename conditional<(ScalarU(-1) > unsigned(-1)), ScalarU,
unsigned>
::type ScalarX;
900 ScalarX range = ScalarX(
y) - ScalarX(x);
903 ScalarX multiplier = 1;
904 const unsigned rand_max = RAND_MAX;
905 if (range <= rand_max)
divisor = (rand_max + 1) / (range + 1);
906 else multiplier = 1 + range / (rand_max + 1);
909 offset = (unsigned(std::rand()) * multiplier) /
divisor;
910 }
while (offset > range);
911 return Scalar(ScalarX(x) + offset);
914 static inline Scalar
run()
916#ifdef EIGEN_MAKING_DOCS
920 scalar_bits =
sizeof(Scalar) * CHAR_BIT,
924 return Scalar((std::rand() >> shift) - offset);
929template<
typename Scalar>
932 static inline Scalar
run(
const Scalar& x,
const Scalar&
y)
934 return Scalar(random(x.real(),
y.real()),
935 random(x.imag(),
y.imag()));
937 static inline Scalar
run()
940 return Scalar(random<RealScalar>(), random<RealScalar>());
944template<
typename Scalar>
950template<
typename Scalar>
959#if (EIGEN_HAS_CXX11_MATH && !(EIGEN_COMP_GNUC_STRICT && __FINITE_MATH_ONLY__)) || (EIGEN_COMP_MSVC>=1800) || (EIGEN_COMP_CLANG)
960#define EIGEN_USE_STD_FPCLASSIFY 1
962#define EIGEN_USE_STD_FPCLASSIFY 0
967typename internal::enable_if<internal::is_integral<T>::value,
bool>
::type
985 #if defined(EIGEN_GPU_COMPILE_PHASE)
987 #elif EIGEN_USE_STD_FPCLASSIFY
1000 #if defined(EIGEN_GPU_COMPILE_PHASE)
1002 #elif EIGEN_USE_STD_FPCLASSIFY
1015 #if defined(EIGEN_GPU_COMPILE_PHASE)
1017 #elif EIGEN_USE_STD_FPCLASSIFY
1025#if (!EIGEN_USE_STD_FPCLASSIFY)
1031 return _fpclass(x)==_FPCLASS_NINF || _fpclass(x)==_FPCLASS_PINF;
1043#elif (defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ && EIGEN_COMP_GNUC)
1045#if EIGEN_GNUC_AT_LEAST(5,0)
1046 #define EIGEN_TMP_NOOPT_ATTRIB EIGEN_DEVICE_FUNC inline __attribute__((optimize("no-finite-math-only")))
1050 #define EIGEN_TMP_NOOPT_ATTRIB EIGEN_DEVICE_FUNC inline __attribute__((noinline,optimize("no-finite-math-only")))
1053template<> EIGEN_TMP_NOOPT_ATTRIB
bool isnan_impl(
const long double& x) {
return __builtin_isnan(x); }
1054template<> EIGEN_TMP_NOOPT_ATTRIB
bool isnan_impl(
const double& x) {
return __builtin_isnan(x); }
1055template<> EIGEN_TMP_NOOPT_ATTRIB
bool isnan_impl(
const float& x) {
return __builtin_isnan(x); }
1056template<> EIGEN_TMP_NOOPT_ATTRIB
bool isinf_impl(
const double& x) {
return __builtin_isinf(x); }
1057template<> EIGEN_TMP_NOOPT_ATTRIB
bool isinf_impl(
const float& x) {
return __builtin_isinf(x); }
1058template<> EIGEN_TMP_NOOPT_ATTRIB
bool isinf_impl(
const long double& x) {
return __builtin_isinf(x); }
1060#undef EIGEN_TMP_NOOPT_ATTRIB
1080#if (!defined(EIGEN_GPUCC) || defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
1101 return y < x ?
y : x;
1119#if defined(EIGEN_HIPCC)
1121 return (x <
y) ? x :
y;
1131 return x <
y ?
y : x;
1149#if defined(EIGEN_HIPCC)
1151 return (x >
y) ? x :
y;
1158#if defined(SYCL_DEVICE_ONLY)
1161#define SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_BINARY(NAME, FUNC) \
1162 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_char) \
1163 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_short) \
1164 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_int) \
1165 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_long)
1166#define SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_UNARY(NAME, FUNC) \
1167 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_char) \
1168 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_short) \
1169 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_int) \
1170 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_long)
1171#define SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_BINARY(NAME, FUNC) \
1172 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_uchar) \
1173 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_ushort) \
1174 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_uint) \
1175 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_ulong)
1176#define SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY(NAME, FUNC) \
1177 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_uchar) \
1178 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_ushort) \
1179 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_uint) \
1180 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_ulong)
1181#define SYCL_SPECIALIZE_INTEGER_TYPES_BINARY(NAME, FUNC) \
1182 SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_BINARY(NAME, FUNC) \
1183 SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_BINARY(NAME, FUNC)
1184#define SYCL_SPECIALIZE_INTEGER_TYPES_UNARY(NAME, FUNC) \
1185 SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_UNARY(NAME, FUNC) \
1186 SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY(NAME, FUNC)
1187#define SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(NAME, FUNC) \
1188 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_float) \
1189 SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC,cl::sycl::cl_double)
1190#define SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(NAME, FUNC) \
1191 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_float) \
1192 SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC,cl::sycl::cl_double)
1193#define SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(NAME, FUNC, RET_TYPE) \
1194 SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, RET_TYPE, cl::sycl::cl_float) \
1195 SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, RET_TYPE, cl::sycl::cl_double)
1197#define SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE) \
1200 EIGEN_ALWAYS_INLINE RET_TYPE NAME(const ARG_TYPE& x) { \
1201 return cl::sycl::FUNC(x); \
1204#define SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, TYPE) \
1205 SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, TYPE, TYPE)
1207#define SYCL_SPECIALIZE_GEN1_BINARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE1, ARG_TYPE2) \
1210 EIGEN_ALWAYS_INLINE RET_TYPE NAME(const ARG_TYPE1& x, const ARG_TYPE2& y) { \
1211 return cl::sycl::FUNC(x, y); \
1214#define SYCL_SPECIALIZE_GEN2_BINARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE) \
1215 SYCL_SPECIALIZE_GEN1_BINARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE, ARG_TYPE)
1217#define SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, TYPE) \
1218 SYCL_SPECIALIZE_GEN2_BINARY_FUNC(NAME, FUNC, TYPE, TYPE)
1220SYCL_SPECIALIZE_INTEGER_TYPES_BINARY(
mini,
min)
1221SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(
mini,
fmin)
1222SYCL_SPECIALIZE_INTEGER_TYPES_BINARY(
maxi,
max)
1223SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(
maxi,
fmax)
1228template<
typename Scalar>
1235template<
typename Scalar>
1242template<
typename Scalar>
1249template<
typename Scalar>
1256template<
typename Scalar>
1263template<
typename Scalar>
1270template<
typename Scalar>
1277template<
typename Scalar>
1284template<
typename Scalar>
1292inline bool abs2(
bool x) {
return x; }
1298 return x >
y ? x -
y :
y - x;
1304 return fabsf(x -
y);
1313#if !defined(EIGEN_GPUCC)
1318 return fabsl(x -
y);
1322template<
typename Scalar>
1329template<
typename Scalar>
1336#if defined(SYCL_DEVICE_ONLY)
1337 SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(
hypot,
hypot)
1340template<
typename Scalar>
1347#if defined(SYCL_DEVICE_ONLY)
1348SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
log1p,
log1p)
1351#if defined(EIGEN_GPUCC)
1353float log1p(
const float &x) { return ::log1pf(x); }
1359template<
typename ScalarX,
typename ScalarY>
1366#if defined(SYCL_DEVICE_ONLY)
1367SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(
pow,
pow)
1374#if defined(SYCL_DEVICE_ONLY)
1375SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(
isnan,
isnan,
bool)
1376SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(
isinf,
isinf,
bool)
1377SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(
isfinite,
isfinite,
bool)
1380template<
typename Scalar>
1387template<
typename Scalar>
1394#if defined(SYCL_DEVICE_ONLY)
1395SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
round,
round)
1406#if defined(SYCL_DEVICE_ONLY)
1407SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
floor,
floor)
1410#if defined(EIGEN_GPUCC)
1412float floor(
const float &x) { return ::floorf(x); }
1426#if defined(SYCL_DEVICE_ONLY)
1427SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
ceil,
ceil)
1430#if defined(EIGEN_GPUCC)
1432float ceil(
const float &x) { return ::ceilf(x); }
1445 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 };
1451 return table[(v * 0x07C4ACDDU) >> 27];
1463template<
typename Scalar>
1475#if defined(SYCL_DEVICE_ONLY)
1476SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
sqrt,
sqrt)
1493#if defined(SYCL_DEVICE_ONLY)
1494SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
log,
log)
1498#if defined(EIGEN_GPUCC)
1500float log(
const float &x) { return ::logf(x); }
1521#if defined(SYCL_DEVICE_ONLY)
1522SYCL_SPECIALIZE_INTEGER_TYPES_UNARY(
abs,
abs)
1523SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
abs,
fabs)
1526#if defined(EIGEN_GPUCC)
1528float abs(
const float &x) { return ::fabsf(x); }
1534float abs(
const std::complex<float>& x) {
1535 return ::hypotf(x.real(), x.imag());
1539double abs(
const std::complex<double>& x) {
1551#if defined(SYCL_DEVICE_ONLY)
1552SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
exp,
exp)
1555#if defined(EIGEN_GPUCC)
1557float exp(
const float &x) { return ::expf(x); }
1563std::complex<float>
exp(
const std::complex<float>& x) {
1564 float com = ::expf(x.real());
1565 float res_real = com * ::cosf(x.imag());
1566 float res_imag = com * ::sinf(x.imag());
1567 return std::complex<float>(res_real, res_imag);
1571std::complex<double>
exp(
const std::complex<double>& x) {
1572 double com =
::exp(x.real());
1573 double res_real = com *
::cos(x.imag());
1574 double res_imag = com *
::sin(x.imag());
1575 return std::complex<double>(res_real, res_imag);
1579template<
typename Scalar>
1586#if defined(SYCL_DEVICE_ONLY)
1587SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
expm1,
expm1)
1590#if defined(EIGEN_GPUCC)
1592float expm1(
const float &x) { return ::expm1f(x); }
1605#if defined(SYCL_DEVICE_ONLY)
1606SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
cos,
cos)
1609#if defined(EIGEN_GPUCC)
1611float cos(
const float &x) { return ::cosf(x); }
1624#if defined(SYCL_DEVICE_ONLY)
1625SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
sin,
sin)
1628#if defined(EIGEN_GPUCC)
1630float sin(
const float &x) { return ::sinf(x); }
1643#if defined(SYCL_DEVICE_ONLY)
1644SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
tan,
tan)
1647#if defined(EIGEN_GPUCC)
1649float tan(
const float &x) { return ::tanf(x); }
1662#if EIGEN_HAS_CXX11_MATH
1665T
acosh(
const T &x) {
1667 return static_cast<T
>(
acosh(x));
1671#if defined(SYCL_DEVICE_ONLY)
1672SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
acos,
acos)
1673SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
acosh,
acosh)
1676#if defined(EIGEN_GPUCC)
1678float acos(
const float &x) { return ::acosf(x); }
1691#if EIGEN_HAS_CXX11_MATH
1694T
asinh(
const T &x) {
1696 return static_cast<T
>(
asinh(x));
1700#if defined(SYCL_DEVICE_ONLY)
1701SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
asin,
asin)
1702SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
asinh,
asinh)
1705#if defined(EIGEN_GPUCC)
1707float asin(
const float &x) { return ::asinf(x); }
1717 return static_cast<T
>(
atan(x));
1720#if EIGEN_HAS_CXX11_MATH
1723T
atanh(
const T &x) {
1725 return static_cast<T
>(
atanh(x));
1729#if defined(SYCL_DEVICE_ONLY)
1730SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
atan,
atan)
1731SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
atanh,
atanh)
1734#if defined(EIGEN_GPUCC)
1736float atan(
const float &x) { return ::atanf(x); }
1747 return static_cast<T
>(
cosh(x));
1750#if defined(SYCL_DEVICE_ONLY)
1751SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
cosh,
cosh)
1754#if defined(EIGEN_GPUCC)
1756float cosh(
const float &x) { return ::coshf(x); }
1766 return static_cast<T
>(
sinh(x));
1769#if defined(SYCL_DEVICE_ONLY)
1770SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
sinh,
sinh)
1773#if defined(EIGEN_GPUCC)
1775float sinh(
const float &x) { return ::sinhf(x); }
1788#if (!defined(EIGEN_GPUCC)) && EIGEN_FAST_MATH && !defined(SYCL_DEVICE_ONLY)
1793#if defined(SYCL_DEVICE_ONLY)
1794SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(
tanh,
tanh)
1797#if defined(EIGEN_GPUCC)
1799float tanh(
const float &x) { return ::tanhf(x); }
1805template <
typename T>
1812#if defined(SYCL_DEVICE_ONLY)
1813SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(
fmod,
fmod)
1816#if defined(EIGEN_GPUCC)
1819float fmod(
const float& a,
const float&
b) {
1820 return ::fmodf(a,
b);
1825double fmod(
const double& a,
const double&
b) {
1830#if defined(SYCL_DEVICE_ONLY)
1831#undef SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_BINARY
1832#undef SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_UNARY
1833#undef SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_BINARY
1834#undef SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY
1835#undef SYCL_SPECIALIZE_INTEGER_TYPES_BINARY
1836#undef SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY
1837#undef SYCL_SPECIALIZE_FLOATING_TYPES_BINARY
1838#undef SYCL_SPECIALIZE_FLOATING_TYPES_UNARY
1839#undef SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE
1840#undef SYCL_SPECIALIZE_GEN_UNARY_FUNC
1841#undef SYCL_SPECIALIZE_UNARY_FUNC
1842#undef SYCL_SPECIALIZE_GEN1_BINARY_FUNC
1843#undef SYCL_SPECIALIZE_GEN2_BINARY_FUNC
1844#undef SYCL_SPECIALIZE_BINARY_FUNC
1873template<
typename Scalar,
1878template<
typename Scalar>
1899template<
typename Scalar>
1906 return x == Scalar(0);
1920template<
typename Scalar>
1936template<
typename Scalar>
1968 return random<int>(0,1)==0 ? false :
true;
1971 static inline bool run(
const bool& a,
const bool&
b)
1973 return random<int>(a,
b)==0 ? false :
true;
2007template <
typename RealScalar>
2010 const std::complex<RealScalar>& x) {
2012 RealScalar xr = x.real();
2013 RealScalar xi = x.imag();
2023 RealScalar erm1 = numext::expm1<RealScalar>(xr);
2024 RealScalar er = erm1 + RealScalar(1.);
2025 RealScalar sin2 =
numext::sin(xi / RealScalar(2.));
2028 RealScalar real_part = erm1 - RealScalar(2.) * er * sin2;
2029 return std::complex<RealScalar>(real_part, er * s);
2041#if defined(EIGEN_GPU_COMPILE_PHASE)
2043struct conj_impl<
std::complex<T>, true>
2046 static inline std::complex<T>
run(
const std::complex<T>& x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
Definition: ArrayCwiseUnaryOps.h:66
EIGEN_DEVICE_FUNC const RintReturnType rint() const
Definition: ArrayCwiseUnaryOps.h:453
EIGEN_DEVICE_FUNC RealReturnType real() const
Definition: CommonCwiseUnaryOps.h:100
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
Definition: CommonCwiseUnaryOps.h:109
#define EIGEN_PLAIN_ENUM_MAX(a, b)
Definition: Macros.h:1299
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:942
#define EIGEN_USING_STD(FUNC)
Definition: Macros.h:1195
#define EIGEN_PLAIN_ENUM_MIN(a, b)
Definition: Macros.h:1298
#define EIGEN_CONSTEXPR
Definition: Macros.h:797
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define eigen_assert(x)
Definition: Macros.h:1047
#define EIGEN_NOT_A_MACRO
Definition: Macros.h:906
#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Definition: Macros.h:995
#define EIGEN_MATHFUNC_IMPL(func, scalar)
Definition: MathFunctions.h:70
#define EIGEN_PI
Definition: MathFunctions.h:16
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
Definition: StaticAssert.h:187
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
constexpr return_t< T > acosh(const T x) noexcept
Compile-time inverse hyperbolic cosine function.
Definition: acosh.hpp:62
constexpr return_t< T > asinh(const T x) noexcept
Compile-time inverse hyperbolic sine function.
Definition: asinh.hpp:59
constexpr return_t< T > atanh(const T x) noexcept
Compile-time inverse hyperbolic tangent function.
Definition: atanh.hpp:73
type
Definition: core.h:575
constexpr common_return_t< T1, T2 > fmod(const T1 x, const T2 y) noexcept
Compile-time remainder of division function.
Definition: fmod.hpp:64
UnitTypeLhs fmax(const UnitTypeLhs x, const UnitTypeRhs y) noexcept
Maximum value.
Definition: math.h:663
UnitTypeLhs fmin(const UnitTypeLhs x, const UnitTypeRhs y) noexcept
Minimum value.
Definition: math.h:686
UnitType round(const UnitType x) noexcept
Round to nearest.
Definition: math.h:591
UnitType fabs(const UnitType x) noexcept
Compute absolute value.
Definition: math.h:708
constexpr common_return_t< T1, T2 > hypot(const T1 x, const T2 y) noexcept
Compile-time Pythagorean addition function.
Definition: hypot.hpp:84
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
constexpr common_t< T1, T2 > min(const T1 x, const T2 y) noexcept
Compile-time pairwise minimum function.
Definition: min.hpp:35
EIGEN_DEVICE_FUNC Scalar expm1(const Scalar &x)
Definition: MathFunctions.h:653
EIGEN_DEVICE_FUNC Scalar log1p(const Scalar &x)
Definition: MathFunctions.h:725
EIGEN_DEVICE_FUNC internal::enable_if< internal::is_integral< T >::value, bool >::type isinf_impl(const T &)
Definition: MathFunctions.h:973
EIGEN_DEVICE_FUNC std::complex< T > complex_sqrt(const std::complex< T > &z)
Definition: MathFunctionsImpl.h:111
@ meta_floor_log2_terminate
Definition: MathFunctions.h:838
@ meta_floor_log2_move_up
Definition: MathFunctions.h:839
@ meta_floor_log2_move_down
Definition: MathFunctions.h:840
@ meta_floor_log2_bogus
Definition: MathFunctions.h:841
const Scalar & y
Definition: MathFunctions.h:821
EIGEN_DEVICE_FUNC internal::enable_if< internal::is_integral< T >::value, bool >::type isfinite_impl(const T &)
Definition: MathFunctions.h:978
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: MathFunctions.h:1947
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: MathFunctions.h:1940
EIGEN_DEVICE_FUNC NewType cast(const OldType &x)
Definition: MathFunctions.h:460
EIGEN_DEVICE_FUNC std::complex< T > complex_rsqrt(const std::complex< T > &z)
Definition: MathFunctionsImpl.h:148
T generic_fast_tanh_float(const T &a_x)
Definition: MathFunctionsImpl.h:29
EIGEN_DEVICE_FUNC std::complex< T > complex_log(const std::complex< T > &z)
Definition: MathFunctionsImpl.h:188
EIGEN_DEVICE_FUNC internal::enable_if< internal::is_integral< T >::value, bool >::type isnan_impl(const T &)
Definition: MathFunctions.h:968
EIGEN_MATHFUNC_RETVAL(random, Scalar) random(const Scalar &x
EIGEN_DEVICE_FUNC bool isApproxOrLessThan(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: MathFunctions.h:1954
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T log(const T &x)
Definition: MathFunctions.h:1489
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool() isinf(const Eigen::bfloat16 &h)
Definition: BFloat16.h:665
EIGEN_DEVICE_FUNC bool() isfinite(const T &x)
Definition: MathFunctions.h:1372
EIGEN_DEVICE_FUNC bool() isinf(const T &x)
Definition: MathFunctions.h:1371
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const X &x, const Y &y)
Definition: Meta.h:787
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool() isfinite(const Eigen::bfloat16 &h)
Definition: BFloat16.h:671
int log2(int x)
Log base 2 for 32 bits positive integers.
Definition: MathFunctions.h:1441
EIGEN_DEVICE_FUNC T() floor(const T &x)
Definition: MathFunctions.h:1400
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition: MathFunctions.h:1091
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T fmod(const T &a, const T &b)
Definition: MathFunctions.h:1807
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T cos(const T &x)
Definition: MathFunctions.h:1600
EIGEN_DEVICE_FUNC const Scalar & y
Definition: MathFunctions.h:1332
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T rsqrt(const T &x)
Definition: MathFunctions.h:1482
EIGEN_DEVICE_FUNC internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar)>::type imag_ref(const Scalar &x)
Definition: MathFunctions.h:1265
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool() isnan(const Eigen::bfloat16 &h)
Definition: BFloat16.h:659
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T absdiff(const T &x, const T &y)
Definition: MathFunctions.h:1296
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T asin(const T &x)
Definition: MathFunctions.h:1686
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T tanh(const T &x)
Definition: MathFunctions.h:1783
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T atan(const T &x)
Definition: MathFunctions.h:1715
EIGEN_DEVICE_FUNC internal::pow_impl< ScalarX, ScalarY >::result_type pow(const ScalarX &x, const ScalarY &y)
Definition: MathFunctions.h:1361
EIGEN_DEVICE_FUNC T() ceil(const T &x)
Definition: MathFunctions.h:1420
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T cosh(const T &x)
Definition: MathFunctions.h:1745
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double sqrt(const double &x)
Definition: MathFunctions.h:184
EIGEN_DEVICE_FUNC EIGEN_MATHFUNC_RETVAL(real, Scalar) real(const Scalar &x)
Definition: MathFunctions.h:1230
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T exp(const T &x)
Definition: MathFunctions.h:1546
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T sin(const T &x)
Definition: MathFunctions.h:1619
EIGEN_DEVICE_FUNC internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar)>::type real_ref(const Scalar &x)
Definition: MathFunctions.h:1237
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T acos(const T &x)
Definition: MathFunctions.h:1657
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float sqrt(const float &x)
Definition: MathFunctions.h:177
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T tan(const T &x)
Definition: MathFunctions.h:1638
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: MathFunctions.h:1083
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE internal::enable_if< NumTraits< T >::IsSigned||NumTraits< T >::IsComplex, typenameNumTraits< T >::Real >::type abs(const T &x)
Definition: MathFunctions.h:1509
EIGEN_DEVICE_FUNC bool abs2(bool x)
Definition: MathFunctions.h:1292
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T sinh(const T &x)
Definition: MathFunctions.h:1764
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_DEVICE_FUNC bool sqrt< bool >(const bool &x)
Definition: MathFunctions.h:1473
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE internal::enable_if<!(NumTraits< T >::IsSigned||NumTraits< T >::IsComplex), typenameNumTraits< T >::Real >::type abs(const T &x)
Definition: MathFunctions.h:1517
Namespace containing all symbols from the Eigen library.
Definition: Core:141
uint32_t divisor
Definition: format-inl.h:236
Definition: Eigen_Colamd.h:50
constexpr bool is_inf(const T x) noexcept
Definition: is_inf.hpp:128
Definition: BFloat16.h:88
constexpr common_t< T1, T2 > pow(const T1 base, const T2 exp_term) noexcept
Compile-time power function.
Definition: pow.hpp:76
@ IsComplex
Definition: NumTraits.h:157
T Real
Definition: NumTraits.h:164
Holds information about the various numeric (i.e.
Definition: NumTraits.h:233
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:806
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:293
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:291
Definition: MathFunctions.h:279
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:282
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:280
Definition: MathFunctions.h:301
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:304
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:302
Definition: MathFunctions.h:312
NumTraits< Scalar >::Real type
Definition: MathFunctions.h:313
Definition: MathFunctions.h:59
void type
Definition: MathFunctions.h:59
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:628
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:626
Definition: MathFunctions.h:614
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:617
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:615
Definition: MathFunctions.h:635
Definition: MathFunctions.h:639
NumTraits< Scalar >::Real type
Definition: MathFunctions.h:640
static EIGEN_DEVICE_FUNC NewType run(const OldType &x)
Definition: MathFunctions.h:449
Definition: MathFunctions.h:432
static EIGEN_DEVICE_FUNC NewType run(const OldType &x)
Definition: MathFunctions.h:434
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:257
Definition: MathFunctions.h:245
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:247
Definition: MathFunctions.h:265
Definition: MathFunctions.h:269
Scalar type
Definition: MathFunctions.h:270
static EIGEN_DEVICE_FUNC std::complex< RealScalar > run(const std::complex< RealScalar > &x)
Definition: MathFunctions.h:2009
Definition: MathFunctions.h:674
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:675
Definition: MathFunctions.h:689
Scalar type
Definition: MathFunctions.h:690
T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl type
Definition: MathFunctions.h:67
Definition: MathFunctions.h:55
T type
Definition: MathFunctions.h:56
Definition: MathFunctionsImpl.h:98
Definition: MathFunctions.h:422
NumTraits< Scalar >::Real type
Definition: MathFunctions.h:423
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:141
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:139
Definition: MathFunctions.h:127
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &)
Definition: MathFunctions.h:130
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:128
Definition: MathFunctions.h:148
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR const Scalar run(const Scalar &)
Definition: MathFunctions.h:224
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Scalar run(Scalar &)
Definition: MathFunctions.h:219
Definition: MathFunctions.h:201
static EIGEN_DEVICE_FUNC const RealScalar & run(const Scalar &x)
Definition: MathFunctions.h:209
static EIGEN_DEVICE_FUNC RealScalar & run(Scalar &x)
Definition: MathFunctions.h:204
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:202
Definition: MathFunctions.h:231
Definition: MathFunctions.h:235
NumTraits< Scalar >::Real & type
Definition: MathFunctions.h:236
Definition: MathFunctions.h:165
NumTraits< Scalar >::Real type
Definition: MathFunctions.h:166
static EIGEN_DEVICE_FUNC std::complex< RealScalar > run(const std::complex< RealScalar > &x)
Definition: MathFunctions.h:754
Definition: MathFunctions.h:738
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:739
Definition: MathFunctions.h:763
Scalar type
Definition: MathFunctions.h:764
static EIGEN_DEVICE_FUNC std::complex< Scalar > run(const std::complex< Scalar > &z)
Definition: MathFunctions.h:711
Definition: MathFunctions.h:701
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:702
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:398
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:387
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:385
Definition: MathFunctions.h:380
Definition: MathFunctions.h:406
Definition: MathFunctions.h:410
NumTraits< Scalar >::Real type
Definition: MathFunctions.h:411
ScalarX result_type
Definition: MathFunctions.h:786
static EIGEN_DEVICE_FUNC ScalarX run(ScalarX x, ScalarY y)
Definition: MathFunctions.h:787
Definition: MathFunctions.h:773
static EIGEN_DEVICE_FUNC result_type run(const ScalarX &x, const ScalarY &y)
Definition: MathFunctions.h:776
ScalarBinaryOpTraits< ScalarX, ScalarY, internal::scalar_pow_op< ScalarX, ScalarY > >::ReturnType result_type
Definition: MathFunctions.h:775
static Scalar run(const Scalar &x, const Scalar &y)
Definition: MathFunctions.h:827
static Scalar run()
Definition: MathFunctions.h:831
static Scalar run()
Definition: MathFunctions.h:914
static Scalar run(const Scalar &x, const Scalar &y)
Definition: MathFunctions.h:887
static Scalar run()
Definition: MathFunctions.h:937
static Scalar run(const Scalar &x, const Scalar &y)
Definition: MathFunctions.h:932
Definition: MathFunctions.h:810
static bool run()
Definition: MathFunctions.h:1966
static bool run(const bool &a, const bool &b)
Definition: MathFunctions.h:1971
Definition: MathFunctions.h:813
Definition: MathFunctions.h:817
Scalar type
Definition: MathFunctions.h:818
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:93
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:91
Definition: MathFunctions.h:79
static EIGEN_DEVICE_FUNC RealScalar run(const Scalar &x)
Definition: MathFunctions.h:82
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:80
Definition: MathFunctions.h:100
Definition: MathFunctions.h:175
static EIGEN_DEVICE_FUNC const RealScalar & run(const Scalar &x)
Definition: MathFunctions.h:183
static EIGEN_DEVICE_FUNC RealScalar & run(Scalar &x)
Definition: MathFunctions.h:178
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:176
Definition: MathFunctions.h:191
NumTraits< Scalar >::Real & type
Definition: MathFunctions.h:192
Definition: MathFunctions.h:117
NumTraits< Scalar >::Real type
Definition: MathFunctions.h:118
static EIGEN_DEVICE_FUNC double run(const double &x)
Definition: MathFunctions.h:550
static EIGEN_DEVICE_FUNC float run(const float &x)
Definition: MathFunctions.h:558
Definition: MathFunctions.h:534
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:536
Definition: MathFunctions.h:567
Scalar type
Definition: MathFunctions.h:568
Definition: MathFunctions.h:471
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:473
Definition: MathFunctions.h:525
Scalar type
Definition: MathFunctions.h:526
Definition: MathFunctions.h:497
static EIGEN_DEVICE_FUNC Scalar run(const Scalar &x)
Definition: MathFunctions.h:499
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::complex< T > run(const std::complex< T > &x)
Definition: MathFunctions.h:363
Definition: MathFunctions.h:2034
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T run(const T &x)
Definition: MathFunctions.h:2036
Definition: MathFunctions.h:371
Scalar type
Definition: MathFunctions.h:372
static EIGEN_DEVICE_FUNC bool isApproxOrLessThan(const Scalar &x, const Scalar &y, const RealScalar &prec)
Definition: MathFunctions.h:1893
static EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const RealScalar &prec)
Definition: MathFunctions.h:1888
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:1881
static EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const RealScalar &prec)
Definition: MathFunctions.h:1883
static EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const Scalar &, const RealScalar &)
Definition: MathFunctions.h:1904
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:1902
static EIGEN_DEVICE_FUNC bool isApproxOrLessThan(const Scalar &x, const Scalar &y, const RealScalar &)
Definition: MathFunctions.h:1914
static EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const RealScalar &)
Definition: MathFunctions.h:1909
NumTraits< Scalar >::Real RealScalar
Definition: MathFunctions.h:1923
static EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const RealScalar &prec)
Definition: MathFunctions.h:1930
static EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const RealScalar &prec)
Definition: MathFunctions.h:1925
Definition: MathFunctions.h:1876
static EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const bool &x, const bool &, const bool &)
Definition: MathFunctions.h:1982
bool RealScalar
Definition: MathFunctions.h:1979
static EIGEN_DEVICE_FUNC bool isApprox(bool x, bool y, bool)
Definition: MathFunctions.h:1988
static EIGEN_DEVICE_FUNC bool isApproxOrLessThan(const bool &x, const bool &y, const bool &)
Definition: MathFunctions.h:1994
Definition: MathFunctions.h:1937
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::complex< T > run(const std::complex< T > &x)
Definition: MathFunctions.h:340
Definition: MathFunctions.h:322
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar run(const Scalar &x)
Definition: MathFunctions.h:324
Definition: MathFunctions.h:348
Scalar type
Definition: MathFunctions.h:349