14#if defined(EIGEN_GPU_COMPILE_PHASE)
18 #if defined(EIGEN_CUDA_ARCH)
19 #include <math_constants.h>
22 #if defined(EIGEN_HIP_DEVICE_COMPILE)
29#define EIGEN_ICC_NEEDS_CSTDINT (EIGEN_COMP_ICC>=1600 && EIGEN_COMP_CXXVER >= 11)
32#if EIGEN_HAS_CXX11 || EIGEN_ICC_NEEDS_CSTDINT
87#if EIGEN_ICC_NEEDS_CSTDINT
88typedef std::intptr_t
IntPtr;
94#undef EIGEN_ICC_NEEDS_CSTDINT
99template<
bool Condition>
108template<
bool Condition,
typename Then,
typename Else>
111template<
typename Then,
typename Else>
124template <
class T,
unsigned int Size>
struct remove_const<const T[Size]> {
typedef T
type[Size]; };
148template<
typename T,
typename U>
struct is_same {
enum {
value = 0 }; };
156template<>
struct is_arithmetic<unsigned long long> {
enum {
value =
true }; };
157using std::is_integral;
177using std::make_unsigned;
193template<>
struct make_unsigned<signed __int64> {
typedef unsigned __int64
type; };
194template<>
struct make_unsigned<unsigned __int64> {
typedef unsigned __int64
type; };
202#if EIGEN_OS_MAC || EIGEN_COMP_MINGW
203template<>
struct make_unsigned<unsigned long long> {
typedef unsigned long long type; };
204template<>
struct make_unsigned<long long> {
typedef unsigned long long type; };
222using std::is_convertible;
226template<
typename From,
typename To>
230 struct any_conversion
232 template <
typename T> any_conversion(
const volatile T&);
233 template <
typename T> any_conversion(T&);
235 struct yes {
int a[1];};
236 struct no {
int a[2];};
239 static yes test(T,
int);
242 static no test(any_conversion, ...);
246#ifdef __INTEL_COMPILER
248 #pragma warning ( disable : 2259 )
251#ifdef __INTEL_COMPILER
256template<
typename From,
typename To>
273template<
bool Condition,
typename T=
void>
struct enable_if;
278#if defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
279#if !defined(__FLT_EPSILON__)
280#define __FLT_EPSILON__ FLT_EPSILON
281#define __DBL_EPSILON__ DBL_EPSILON
286template<
typename T>
struct numeric_limits
290 static T (
max)() { assert(
false &&
"Highest not supported for this type"); }
291 static T (
min)() { assert(
false &&
"Lowest not supported for this type"); }
292 static T infinity() { assert(
false &&
"Infinity not supported for this type"); }
293 static T quiet_NaN() { assert(
false &&
"quiet_NaN not supported for this type"); }
295template<>
struct numeric_limits<float>
298 static float epsilon() {
return __FLT_EPSILON__; }
300 static float (
max)() {
301 #if defined(EIGEN_CUDA_ARCH)
302 return CUDART_MAX_NORMAL_F;
304 return HIPRT_MAX_NORMAL_F;
308 static float (
min)() {
return FLT_MIN; }
310 static float infinity() {
311 #if defined(EIGEN_CUDA_ARCH)
318 static float quiet_NaN() {
319 #if defined(EIGEN_CUDA_ARCH)
326template<>
struct numeric_limits<double>
329 static double epsilon() {
return __DBL_EPSILON__; }
331 static double (
max)() {
return DBL_MAX; }
333 static double (
min)() {
return DBL_MIN; }
335 static double infinity() {
336 #if defined(EIGEN_CUDA_ARCH)
343 static double quiet_NaN() {
344 #if defined(EIGEN_CUDA_ARCH)
351template<>
struct numeric_limits<int>
354 static int epsilon() {
return 0; }
356 static int (
max)() {
return INT_MAX; }
358 static int (
min)() {
return INT_MIN; }
360template<>
struct numeric_limits<unsigned int>
363 static unsigned int epsilon() {
return 0; }
365 static unsigned int (
max)() {
return UINT_MAX; }
367 static unsigned int (
min)() {
return 0; }
369template<>
struct numeric_limits<long>
372 static long epsilon() {
return 0; }
374 static long (
max)() {
return LONG_MAX; }
376 static long (
min)() {
return LONG_MIN; }
378template<>
struct numeric_limits<unsigned long>
381 static unsigned long epsilon() {
return 0; }
383 static unsigned long (
max)() {
return ULONG_MAX; }
385 static unsigned long (
min)() {
return 0; }
387template<>
struct numeric_limits<long long>
390 static long long epsilon() {
return 0; }
392 static long long (
max)() {
return LLONG_MAX; }
394 static long long (
min)() {
return LLONG_MIN; }
396template<>
struct numeric_limits<unsigned long long>
399 static unsigned long long epsilon() {
return 0; }
401 static unsigned long long (
max)() {
return ULLONG_MAX; }
403 static unsigned long long (
min)() {
return 0; }
405template<>
struct numeric_limits<bool>
408 static bool epsilon() {
return false; }
410 static bool (
max)() {
return true; }
412 static bool (
min)() {
return false; }
445template<
typename T,
typename EnableIf =
void>
struct array_size {
450 enum {
value = T::SizeAtCompileTime };
453template<
typename T,
int N>
struct array_size<const T (&)[N]> {
461template<
typename T, std::
size_t N>
struct array_size<const
std::
array<T,N> > {
464template<
typename T, std::
size_t N>
struct array_size<
std::
array<T,N> > {
481template<
typename T,std::
size_t N>
499#if EIGEN_HAS_STD_INVOKE_RESULT
500template<
typename T>
struct result_of;
502template<
typename F,
typename... ArgTypes>
503struct result_of<
F(ArgTypes...)> {
504 typedef typename std::invoke_result<
F, ArgTypes...>
::type type1;
507#elif EIGEN_HAS_STD_RESULT_OF
508template<
typename T>
struct result_of {
519template<
typename Func,
int SizeOf>
522template<
typename Func>
525template<
typename Func>
528template<
typename Func>
537 enum {FunctorType =
sizeof(testFunctor(
static_cast<Func*
>(0)))};
541template<
typename Func,
typename ArgType,
int SizeOf=sizeof(has_none)>
544template<
typename Func,
typename ArgType>
547template<
typename Func,
typename ArgType>
550template<
typename Func,
typename ArgType>
559 enum {FunctorType =
sizeof(testFunctor(
static_cast<Func*
>(0)))};
563template<
typename Func,
typename ArgType0,
typename ArgType1,
int SizeOf=sizeof(has_none)>
566template<
typename Func,
typename ArgType0,
typename ArgType1>
568{
typedef typename Func::result_type
type;};
570template<
typename Func,
typename ArgType0,
typename ArgType1>
574template<
typename Func,
typename ArgType0,
typename ArgType1>
583 enum {FunctorType =
sizeof(testFunctor(
static_cast<Func*
>(0)))};
587template<
typename Func,
typename ArgType0,
typename ArgType1,
typename ArgType2,
int SizeOf=sizeof(has_none)>
590template<
typename Func,
typename ArgType0,
typename ArgType1,
typename ArgType2>
592{
typedef typename Func::result_type
type;};
594template<
typename Func,
typename ArgType0,
typename ArgType1,
typename ArgType2>
598template<
typename Func,
typename ArgType0,
typename ArgType1,
typename ArgType2>
607 enum {FunctorType =
sizeof(testFunctor(
static_cast<Func*
>(0)))};
613#if EIGEN_HAS_STD_INVOKE_RESULT
614template<
typename F,
typename... ArgTypes>
616 typedef typename std::invoke_result<
F, ArgTypes...>
::type type1;
620template<
typename F,
typename... ArgTypes>
621struct invoke_result {
626template<
typename F,
typename ArgType0 =
void,
typename ArgType1 =
void,
typename ArgType2 =
void>
638template<
typename F,
typename ArgType0>
644template<
typename F,
typename ArgType0,
typename ArgType1>
661 enum {
value =
sizeof(testFunctor<T>(
static_cast<T*
>(0))) ==
sizeof(
meta_yes) };
666template <
typename T,
typename IndexType=Index>
675template <
typename T,
typename IndexType=Index>
684template <
typename T,
typename IndexType=Index>
698 int SupX = ((Y==1) ? 1 : Y/2),
699 bool Done = ((SupX-InfX)<=1 ?
true : ((SupX*SupX <= Y) && ((SupX+1)*(SupX+1) > Y))) >
704 MidX = (InfX+SupX)/2,
705 TakeInf = MidX*MidX > Y ? 1 : 0,
706 NewInf =
int(TakeInf) ? InfX : int(MidX),
707 NewSup = int(TakeInf) ? int(MidX) : SupX
713template<
int Y,
int InfX,
int SupX>
714class meta_sqrt<Y, InfX, SupX, true> {
public:
enum {
ret = (SupX*SupX <= Y) ? SupX : InfX }; };
720template<
int A,
int B,
int K=1,
bool Done = ((A*K)%B)==0,
bool Big=(A>=B)>
725template<
int A,
int B,
int K,
bool Done>
730template<
int A,
int B,
int K>
752template<
unsigned Len,
unsigned Align>
763#if defined(EIGEN_GPU_COMPILE_PHASE)
769#if defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
770using internal::device::numeric_limits;
772using std::numeric_limits;
789#if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
791bool equal_strict(
const float& x,
const float&
y) {
return std::equal_to<float>()(x,
y); }
794bool equal_strict(
const double& x,
const double&
y) {
return std::equal_to<double>()(x,
y); }
800#if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
#define EIGEN_DEFAULT_DENSE_INDEX_TYPE
Definition: Macros.h:33
#define EIGEN_CONSTEXPR
Definition: Macros.h:797
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
EIGEN_DEVICE_FUNC ~noncopyable()
Definition: Meta.h:428
EIGEN_DEVICE_FUNC noncopyable()
Definition: Meta.h:427
type
Definition: core.h:575
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
std::size_t UIntPtr
Definition: Meta.h:92
std::ptrdiff_t IntPtr
Definition: Meta.h:91
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
::uint64_t uint64_t
Definition: Meta.h:58
::int16_t int16_t
Definition: Meta.h:55
::uint16_t uint16_t
Definition: Meta.h:54
::uint32_t uint32_t
Definition: Meta.h:56
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const X &x, const Y &y)
Definition: Meta.h:787
EIGEN_DEVICE_FUNC const Scalar & y
Definition: MathFunctions.h:1332
EIGEN_STRONG_INLINE void swap(T &a, T &b)
Definition: Meta.h:766
::int32_t int32_t
Definition: Meta.h:57
::int8_t int8_t
Definition: Meta.h:53
::int64_t int64_t
Definition: Meta.h:59
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const X &x, const Y &y)
Definition: Meta.h:798
::uint8_t uint8_t
Definition: Meta.h:52
EIGEN_DEVICE_FUNC T div_ceil(const T &a, const T &b)
Definition: Meta.h:779
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
Definition: Meta.h:66
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
uint128_t uintptr_t
Definition: format.h:432
result
Definition: format.h:2564
Definition: Eigen_Colamd.h:50
Definition: BFloat16.h:88
void swap(wpi::SmallPtrSet< T, N > &LHS, wpi::SmallPtrSet< T, N > &RHS)
Implement std::swap in terms of SmallPtrSet swap.
Definition: SmallPtrSet.h:512
static constexpr const unit_t< compound_unit< charge::coulomb, inverse< substance::mol > > > F(N_A *e)
Faraday constant.
array(T, Ts...) -> array< T, 1+sizeof...(Ts)>
T & type
Definition: Meta.h:209
T const * type
Definition: Meta.h:216
T const *const type
Definition: Meta.h:217
T const & type
Definition: Meta.h:215
T const *const type
Definition: Meta.h:218
const T type
Definition: Meta.h:214
const T type
Definition: Meta.h:208
EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len]
Func::result_type type
Definition: Meta.h:568
Func::template result< Func(ArgType0, ArgType1)>::type type
Definition: Meta.h:572
internal::remove_all< ArgType0 >::type type
Definition: Meta.h:564
Else type
Definition: Meta.h:112
Then type
Definition: Meta.h:109
T type
Definition: Meta.h:276
static meta_yes testFunctor(C const *, typename C::ReturnType const *=0)
static meta_no testFunctor(...)
static meta_no testFunctor(...)
static meta_yes testFunctor(C const *, typename enable_if<(sizeof(return_ptr< C >() ->operator()(IndexType(0), IndexType(0)))>0)>::type *=0)
int a[1]
Definition: Meta.h:515
static meta_no testFunctor(...)
static meta_yes testFunctor(C const *, typename enable_if<(sizeof(return_ptr< C >() ->operator()())>0)>::type *=0)
int a[2]
Definition: Meta.h:516
int a[3]
Definition: Meta.h:517
static meta_no testFunctor(...)
static meta_yes testFunctor(C const *, typename enable_if<(sizeof(return_ptr< C >() ->operator()(IndexType(0)))>0)>::type *=0)
remove_all< type1 >::type type
Definition: Meta.h:647
result_of< F(ArgType0, ArgType1)>::type type1
Definition: Meta.h:646
result_of< F(ArgType0)>::type type1
Definition: Meta.h:640
remove_all< type1 >::type type
Definition: Meta.h:641
result_of< F()>::type type1
Definition: Meta.h:634
remove_all< type1 >::type type
Definition: Meta.h:635
result_of< F(ArgType0, ArgType1, ArgType2)>::type type1
Definition: Meta.h:628
remove_all< type1 >::type type
Definition: Meta.h:629
static internal::remove_reference< From >::type * ms_from
Definition: Meta.h:245
unsigned char type
Definition: Meta.h:183
unsigned char type
Definition: Meta.h:184
unsigned int type
Definition: Meta.h:188
unsigned long type
Definition: Meta.h:190
unsigned short type
Definition: Meta.h:186
unsigned char type
Definition: Meta.h:185
unsigned int type
Definition: Meta.h:189
unsigned long type
Definition: Meta.h:191
unsigned short type
Definition: Meta.h:187
Func::result_type type
Definition: Meta.h:523
Func::template result< Func()>::type type
Definition: Meta.h:526
remove_all< T >::type type
Definition: Meta.h:131
remove_all< T >::type type
Definition: Meta.h:129
remove_all< T >::type type
Definition: Meta.h:130
remove_all< T >::type type
Definition: Meta.h:128
remove_all< T >::type type
Definition: Meta.h:127
T type
Definition: Meta.h:126
T type
Definition: Meta.h:122
T type
Definition: Meta.h:121
T type
Definition: Meta.h:118
T type
Definition: Meta.h:119
T type
Definition: Meta.h:117
T type
Definition: Meta.h:115
T type
Definition: Meta.h:114
static has_none testFunctor(...)
nullary_result_of_select< Func, FunctorType >::type type
Definition: Meta.h:538
static has_std_result_type testFunctor(T const *, typename T::result_type const *=0)
static has_tr1_result testFunctor(T const *, typename T::template result< T()>::type const *=0)
static has_std_result_type testFunctor(T const *, typename T::result_type const *=0)
ternary_result_of_select< Func, ArgType0, ArgType1, ArgType2, FunctorType >::type type
Definition: Meta.h:608
static has_none testFunctor(...)
static has_tr1_result testFunctor(T const *, typename T::template result< T(ArgType0, ArgType1, ArgType2)>::type const *=0)
static has_none testFunctor(...)
binary_result_of_select< Func, ArgType0, ArgType1, FunctorType >::type type
Definition: Meta.h:584
static has_tr1_result testFunctor(T const *, typename T::template result< T(ArgType0, ArgType1)>::type const *=0)
static has_std_result_type testFunctor(T const *, typename T::result_type const *=0)
unary_result_of_select< Func, ArgType, FunctorType >::type type
Definition: Meta.h:560
static has_std_result_type testFunctor(T const *, typename T::result_type const *=0)
static has_tr1_result testFunctor(T const *, typename T::template result< T(ArgType)>::type const *=0)
static has_none testFunctor(...)
@ Defined
Definition: Meta.h:740
Func::result_type type
Definition: Meta.h:592
Func::template result< Func(ArgType0, ArgType1, ArgType2)>::type type
Definition: Meta.h:596
internal::remove_all< ArgType0 >::type type
Definition: Meta.h:588
Func::result_type type
Definition: Meta.h:545
Func::template result< Func(ArgType)>::type type
Definition: Meta.h:548
internal::remove_all< ArgType >::type type
Definition: Meta.h:542
Definition: format.h:1552