15 #include "../InternalHeaderCheck.h"
17 #if defined(EIGEN_GPU_COMPILE_PHASE)
21 #if defined(EIGEN_CUDA_ARCH)
25 #if defined(EIGEN_HIP_DEVICE_COMPILE)
45 template <
size_t Size>
101 template <
bool Condition>
111 using std::conditional;
112 using std::remove_const;
113 using std::remove_pointer;
114 using std::remove_reference;
116 template <
typename T>
120 template <
typename T>
124 template <
typename T>
128 template <
typename T>
132 template <
typename T>
136 template <
typename T>
141 template <
typename T>
144 template <
typename T>
157 #ifndef EIGEN_GPU_COMPILE_PHASE
204 template <
typename T,
typename U>
208 template <
typename T>
224 #if EIGEN_COMP_CXXVER >= 17
227 template <
typename...>
239 using std::is_integral;
241 using std::make_unsigned;
243 template <
typename T>
247 template <
typename T>
252 template <
typename T>
256 template <
typename T>
260 template <
typename T>
264 template <
typename T>
268 template <
typename T>
273 template <
typename T>
276 using std::is_convertible;
304 template <
typename T,
typename EnableIf =
void>
309 template <
typename T>
310 struct array_size<
T, std::enable_if_t<((T::SizeAtCompileTime & 0) == 0)>> {
314 template <
typename T,
int N>
318 template <
typename T,
int N>
323 template <
typename T, std::
size_t N>
327 template <
typename T, std::
size_t N>
342 #if EIGEN_COMP_CXXVER < 20 || EIGEN_GNUC_STRICT_LESS_THAN(10, 0, 0)
343 template <
typename T>
345 using R = std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(
x.size())>>;
346 return static_cast<R>(
x.size());
349 template <
typename T, std::ptrdiff_t N>
354 template <
typename T>
357 return ssize(std::forward<T>(
x));
371 #if EIGEN_HAS_STD_INVOKE_RESULT
372 template <
typename T>
375 template <
typename F,
typename... ArgTypes>
376 struct result_of<
F(ArgTypes...)> {
377 typedef typename std::invoke_result<
F, ArgTypes...>
::type type1;
378 typedef remove_all_t<type1>
type;
381 template <
typename F,
typename... ArgTypes>
382 struct invoke_result {
383 typedef typename std::invoke_result<
F, ArgTypes...>
::type type1;
384 typedef remove_all_t<type1>
type;
387 template <
typename T>
393 template <
typename F,
typename... ArgTypes>
401 template <
bool... values>
403 std::is_same<std::integer_sequence<
bool, values...,
true>, std::integer_sequence<
bool,
true, values...>>;
406 template <
bool... values>
407 using reduce_any = std::integral_constant<
bool, !std::is_same<std::integer_sequence<
bool, values...,
false>,
408 std::integer_sequence<
bool,
false, values...>>
::value>;
418 template <
typename T>
420 template <
typename C>
422 template <
typename C>
428 template <
typename T>
431 template <
typename T,
typename IndexType = Index>
433 template <
typename C>
440 template <
typename T,
typename IndexType = Index>
442 template <
typename C>
443 static meta_yes testFunctor(
C const*, std::enable_if_t<(
sizeof(return_ptr<C>()->
operator()(IndexType(0))) > 0)>* = 0);
449 template <
typename T,
typename IndexType = Index>
451 template <
typename C>
453 C const*, std::enable_if_t<(
sizeof(return_ptr<C>()->
operator()(IndexType(0), IndexType(0))) > 0)>* = 0);
462 template <
int Y,
int InfX = 0,
int SupX = ((
Y == 1) ? 1 :
Y / 2),
463 bool Done = ((SupX - InfX) <= 1 || ((SupX * SupX <=
Y) && ((SupX + 1) * (SupX + 1) >
Y)))>
466 MidX = (InfX + SupX) / 2,
467 TakeInf = MidX * MidX >
Y ? 1 : 0,
468 NewInf =
int(TakeInf) ? InfX :
int(MidX),
469 NewSup =
int(TakeInf) ?
int(MidX) : SupX
476 template <
int Y,
int InfX,
int SupX>
479 enum {
ret = (SupX * SupX <=
Y) ? SupX : InfX };
485 template <
int A,
int B,
int K = 1,
bool Done = ((A * K) % B) == 0,
bool Big = (A >=
B)>
489 template <
int A,
int B,
int K,
bool Done>
493 template <
int A,
int B,
int K>
499 template <
typename T,
typename U>
513 template <
unsigned Len,
unsigned Align>
522 template <
typename T>
527 #if defined(EIGEN_GPU_COMPILE_PHASE)
528 template <
typename T>
535 template <
typename T>
541 using std::numeric_limits;
544 template <typename X, typename Y, bool XIsInteger = NumTraits<X>::IsInteger,
bool XIsSigned =
NumTraits<X>::IsSigned,
549 template <
typename X,
typename Y>
556 return y < Y(0) ? false : (x == static_cast<UnsignedY>(
y));
559 template <
typename X,
typename Y>
570 template <
typename X,
typename Y>
575 #if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
578 return std::equal_to<float>()(
x,
y);
583 return std::equal_to<double>()(
x,
y);
591 template <
typename X>
600 template <
typename X>
605 template <
typename X,
typename Y>
610 #if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
613 return std::not_equal_to<float>()(
x,
y);
618 return std::not_equal_to<double>()(
x,
y);
626 template <
typename Scalar>
631 template <
typename Scalar>
638 template <
typename A>
641 template <
typename A,
typename B>
643 static_assert(is_int_or_enum_v<A>,
"Argument a must be an integer or enum");
644 static_assert(is_int_or_enum_v<B>,
"Argument b must be an integer or enum");
648 template <
typename A,
typename B>
651 return ((
int)
a <= (
int)
b) ? (
int)
a : (
int)
b;
655 template <
typename A,
typename B>
658 return ((
int)
a >= (
int)
b) ? (
int)
a : (
int)
b;
667 template <
typename A,
typename B>
670 if ((
int)
a == 0 || (
int)
b == 0)
return 0;
671 if ((
int)
a == 1 || (
int)
b == 1)
return 1;
682 template <
typename A,
typename B>
685 if ((
int)
a == 0 || (
int)
b == 0)
return 0;
686 if ((
int)
a == 1 || (
int)
b == 1)
return 1;
694 template <
typename A,
typename B>
701 template <
typename A,
typename B>
705 return (
int)
a == (
int)
b;
708 template <
typename A,
typename B>
712 return (
int)
a < (
int)
b;
715 template <
typename A,
typename B>
719 return (
int)
a <= (
int)
b;
722 template <
typename A,
typename B>
726 return (
int)
a > (
int)
b;
729 template <
typename A,
typename B>
733 return (
int)
a >= (
int)
b;
743 #if EIGEN_COMP_CXXVER >= 20
Eigen::Triplet< double > T
Definition: EigenUnitTest.cpp:11
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
int data[]
Definition: Map_placement_new.cpp:1
@ R
Definition: StatisticsVector.h:21
Scalar * b
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:48
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
EIGEN_DEVICE_FUNC noncopyable(const noncopyable &)
EIGEN_DEVICE_FUNC ~noncopyable()
Definition: Meta.h:287
EIGEN_DEVICE_FUNC const noncopyable & operator=(const noncopyable &)
EIGEN_DEVICE_FUNC noncopyable()
Definition: Meta.h:286
Definition: matrices.h:74
@ N
Definition: constructor.cpp:22
#define X
Definition: icosphere.cpp:20
RealScalar s
Definition: level1_cplx_impl.h:130
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
const Scalar * a
Definition: level2_cplx_impl.h:32
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
constexpr bool enum_eq_not_dynamic(A a, B b)
Definition: Meta.h:702
constexpr bool enum_ge_not_dynamic(A a, B b)
Definition: Meta.h:730
constexpr int plain_enum_min(A a, B b)
Definition: Meta.h:649
constexpr int plain_enum_max(A a, B b)
Definition: Meta.h:656
constexpr bool enum_gt_not_dynamic(A a, B b)
Definition: Meta.h:723
constexpr void plain_enum_asserts(A, B)
Definition: Meta.h:642
const Scalar & y
Definition: RandomImpl.h:36
std::integral_constant< bool, !std::is_same< std::integer_sequence< bool, values..., false >, std::integer_sequence< bool, false, values... > >::value > reduce_any
Definition: Meta.h:408
constexpr bool is_int_or_enum_v
Definition: Meta.h:639
constexpr bool check_implication(bool a, bool b)
Definition: Meta.h:740
constexpr int min_size_prefer_fixed(A a, B b)
Definition: Meta.h:683
void void_t
Definition: Meta.h:228
constexpr bool logical_xor(bool a, bool b)
Definition: Meta.h:737
std::is_same< std::integer_sequence< bool, values..., true >, std::integer_sequence< bool, true, values... > > reduce_all
Definition: Meta.h:403
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
constexpr bool enum_le_not_dynamic(A a, B b)
Definition: Meta.h:716
EIGEN_CONSTEXPR auto index_list_size(const T &x)
Definition: Meta.h:344
constexpr bool is_constant_evaluated()
Definition: Meta.h:746
constexpr bool enum_lt_not_dynamic(A a, B b)
Definition: Meta.h:709
EIGEN_STRONG_INLINE bool is_identically_zero(const Scalar &s)
Definition: Meta.h:632
void swap(scoped_array< T > &a, scoped_array< T > &b)
Definition: Memory.h:734
constexpr int max_size_prefer_dynamic(A a, B b)
Definition: Meta.h:695
typename add_const_on_value_type< T >::type add_const_on_value_type_t
Definition: Meta.h:274
constexpr int min_size_prefer_dynamic(A a, B b)
Definition: Meta.h:668
std::int32_t int32_t
Definition: Meta.h:41
std::int8_t int8_t
Definition: Meta.h:37
std::uint8_t uint8_t
Definition: Meta.h:36
std::int16_t int16_t
Definition: Meta.h:39
EIGEN_STRONG_INLINE void swap(T &a, T &b)
Definition: Meta.h:536
std::int64_t int64_t
Definition: Meta.h:43
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool is_exactly_zero(const X &x)
Definition: Meta.h:592
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool is_exactly_one(const X &x)
Definition: Meta.h:601
std::uint16_t uint16_t
Definition: Meta.h:38
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const double &x, const double &y)
Definition: Meta.h:582
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const double &x, const double &y)
Definition: Meta.h:617
std::uint32_t uint32_t
Definition: Meta.h:40
std::uint64_t uint64_t
Definition: Meta.h:42
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
std::array< T, N > array
Definition: EmulateArray.h:231
squared absolute value
Definition: GlobalFunctions.h:87
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
Definition: Meta.h:75
const int Dynamic
Definition: Constants.h:25
double K
Wave number.
Definition: sphere_scattering.cc:115
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
@ F
Definition: octree.h:74
list x
Definition: plotDoE.py:28
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
T const * type
Definition: Meta.h:262
T const *const type
Definition: Meta.h:266
T const & type
Definition: Meta.h:258
T const *const type
Definition: Meta.h:270
const T type
Definition: Meta.h:254
EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len]
static constexpr Index value
Definition: Meta.h:306
@ value
Definition: Meta.h:98
@ value
Definition: Meta.h:425
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 *, std::enable_if_t<(sizeof(return_ptr< C >() ->operator()(IndexType(0), IndexType(0))) > 0)> *=0)
@ value
Definition: Meta.h:456
static meta_yes testFunctor(C const *, std::enable_if_t<(sizeof(return_ptr< C >() ->operator()()) > 0)> *=0)
static meta_no testFunctor(...)
@ value
Definition: Meta.h:437
static meta_no testFunctor(...)
@ value
Definition: Meta.h:446
static meta_yes testFunctor(C const *, std::enable_if_t<(sizeof(return_ptr< C >() ->operator()(IndexType(0))) > 0)> *=0)
result_of< F(ArgTypes...)>::type type1
Definition: Meta.h:395
remove_all_t< type1 > type
Definition: Meta.h:396
@ value
Definition: Meta.h:146
static bool run(const Scalar &s)
Definition: Meta.h:628
@ value
Definition: Meta.h:206
remove_all< T >::type type
Definition: Meta.h:138
remove_all< T >::type type
Definition: Meta.h:130
remove_all< T >::type type
Definition: Meta.h:134
remove_all< T >::type type
Definition: Meta.h:126
remove_all< T >::type type
Definition: Meta.h:122
T type
Definition: Meta.h:118
remove_all_t< type1 > type
Definition: Meta.h:390
std::result_of< T >::type type1
Definition: Meta.h:389
@ Defined
Definition: Meta.h:501
@ value
Definition: Meta.h:95
typename internal::make_unsigned< Y >::type UnsignedY
Definition: Meta.h:554
static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X &x, const Y &y)
Definition: Meta.h:555
static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X &x, const Y &y)
Definition: Meta.h:563
static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X &x, const Y &y)
Definition: Meta.h:547
uint8_t unsigned_type
Definition: Meta.h:53
int8_t signed_type
Definition: Meta.h:52
uint16_t unsigned_type
Definition: Meta.h:58
int16_t signed_type
Definition: Meta.h:57
uint32_t unsigned_type
Definition: Meta.h:63
int32_t signed_type
Definition: Meta.h:62
int64_t signed_type
Definition: Meta.h:67
uint64_t unsigned_type
Definition: Meta.h:68
void signed_type
Definition: Meta.h:47
void unsigned_type
Definition: Meta.h:48
#define EIGEN_DEFAULT_DENSE_INDEX_TYPE
Definition: tensor_benchmarks.h:5
const char Y
Definition: test/EulerAngles.cpp:32
void run(const string &dir_name, LinearSolver *linear_solver_pt, const unsigned nel_1d, bool mess_up_order)
Definition: two_d_poisson_compare_solvers.cc:317