Meta.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_META_H
12 #define EIGEN_META_H
13 
14 // IWYU pragma: private
15 #include "../InternalHeaderCheck.h"
16 
17 #if defined(EIGEN_GPU_COMPILE_PHASE)
18 
19 #include <cfloat>
20 
21 #if defined(EIGEN_CUDA_ARCH)
22 #include <math_constants.h>
23 #endif
24 
25 #if defined(EIGEN_HIP_DEVICE_COMPILE)
27 #endif
28 
29 #endif
30 
31 // Define portable (u)int{32,64} types
32 #include <cstdint>
33 
34 namespace Eigen {
35 namespace numext {
44 
45 template <size_t Size>
47  typedef void signed_type;
48  typedef void unsigned_type;
49 };
50 template <>
54 };
55 template <>
59 };
60 template <>
64 };
65 template <>
69 };
70 } // namespace numext
71 } // namespace Eigen
72 
73 namespace Eigen {
74 
76 
84 
85 namespace internal {
86 
94 struct true_type {
95  enum { value = 1 };
96 };
97 struct false_type {
98  enum { value = 0 };
99 };
100 
101 template <bool Condition>
103 
104 template <>
105 struct bool_constant<true> : true_type {};
106 
107 template <>
108 struct bool_constant<false> : false_type {};
109 
110 // Third-party libraries rely on these.
111 using std::conditional;
112 using std::remove_const;
113 using std::remove_pointer;
114 using std::remove_reference;
115 
116 template <typename T>
117 struct remove_all {
118  typedef T type;
119 };
120 template <typename T>
121 struct remove_all<const T> {
122  typedef typename remove_all<T>::type type;
123 };
124 template <typename T>
125 struct remove_all<T const&> {
126  typedef typename remove_all<T>::type type;
127 };
128 template <typename T>
129 struct remove_all<T&> {
130  typedef typename remove_all<T>::type type;
131 };
132 template <typename T>
133 struct remove_all<T const*> {
134  typedef typename remove_all<T>::type type;
135 };
136 template <typename T>
137 struct remove_all<T*> {
138  typedef typename remove_all<T>::type type;
139 };
140 
141 template <typename T>
143 
144 template <typename T>
146  enum { value = false };
147 };
148 template <>
149 struct is_arithmetic<float> {
150  enum { value = true };
151 };
152 template <>
154  enum { value = true };
155 };
156 // GPU devices treat `long double` as `double`.
157 #ifndef EIGEN_GPU_COMPILE_PHASE
158 template <>
159 struct is_arithmetic<long double> {
160  enum { value = true };
161 };
162 #endif
163 template <>
165  enum { value = true };
166 };
167 template <>
169  enum { value = true };
170 };
171 template <>
172 struct is_arithmetic<signed char> {
173  enum { value = true };
174 };
175 template <>
177  enum { value = true };
178 };
179 template <>
180 struct is_arithmetic<signed short> {
181  enum { value = true };
182 };
183 template <>
184 struct is_arithmetic<unsigned short> {
185  enum { value = true };
186 };
187 template <>
188 struct is_arithmetic<signed int> {
189  enum { value = true };
190 };
191 template <>
193  enum { value = true };
194 };
195 template <>
196 struct is_arithmetic<signed long> {
197  enum { value = true };
198 };
199 template <>
200 struct is_arithmetic<unsigned long> {
201  enum { value = true };
202 };
203 
204 template <typename T, typename U>
205 struct is_same {
206  enum { value = 0 };
207 };
208 template <typename T>
209 struct is_same<T, T> {
210  enum { value = 1 };
211 };
212 
213 template <class T>
214 struct is_void : is_same<void, std::remove_const_t<T>> {};
215 
224 #if EIGEN_COMP_CXXVER >= 17
225 using std::void_t;
226 #else
227 template <typename...>
228 using void_t = void;
229 #endif
230 
231 template <>
233  enum { value = true };
234 };
235 template <>
237  enum { value = true };
238 };
239 using std::is_integral;
240 
241 using std::make_unsigned;
242 
243 template <typename T>
244 struct is_const {
245  enum { value = 0 };
246 };
247 template <typename T>
249  enum { value = 1 };
250 };
251 
252 template <typename T>
254  typedef const T type;
255 };
256 template <typename T>
258  typedef T const& type;
259 };
260 template <typename T>
262  typedef T const* type;
263 };
264 template <typename T>
266  typedef T const* const type;
267 };
268 template <typename T>
270  typedef T const* const type;
271 };
272 
273 template <typename T>
275 
276 using std::is_convertible;
277 
281 class noncopyable {
284 
285  protected:
288 };
289 
304 template <typename T, typename EnableIf = void>
305 struct array_size {
306  static constexpr Index value = Dynamic;
307 };
308 
309 template <typename T>
310 struct array_size<T, std::enable_if_t<((T::SizeAtCompileTime & 0) == 0)>> {
311  static constexpr Index value = T::SizeAtCompileTime;
312 };
313 
314 template <typename T, int N>
315 struct array_size<const T (&)[N]> {
316  static constexpr Index value = N;
317 };
318 template <typename T, int N>
319 struct array_size<T (&)[N]> {
320  static constexpr Index value = N;
321 };
322 
323 template <typename T, std::size_t N>
324 struct array_size<const std::array<T, N>> {
325  static constexpr Index value = N;
326 };
327 template <typename T, std::size_t N>
328 struct array_size<std::array<T, N>> {
329  static constexpr Index value = N;
330 };
331 
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());
347 }
348 
349 template <typename T, std::ptrdiff_t N>
350 EIGEN_CONSTEXPR std::ptrdiff_t index_list_size(const T (&)[N]) {
351  return N;
352 }
353 #else
354 template <typename T>
356  using std::ssize;
357  return ssize(std::forward<T>(x));
358 }
359 #endif // EIGEN_COMP_CXXVER
360 
371 #if EIGEN_HAS_STD_INVOKE_RESULT
372 template <typename T>
373 struct result_of;
374 
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;
379 };
380 
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;
385 };
386 #else
387 template <typename T>
388 struct result_of {
389  typedef typename std::result_of<T>::type type1;
391 };
392 
393 template <typename F, typename... ArgTypes>
395  typedef typename result_of<F(ArgTypes...)>::type type1;
397 };
398 #endif
399 
400 // Reduces a sequence of bools to true if all are true, false otherwise.
401 template <bool... values>
402 using reduce_all =
403  std::is_same<std::integer_sequence<bool, values..., true>, std::integer_sequence<bool, true, values...>>;
404 
405 // Reduces a sequence of bools to true if any are true, false if all false.
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>;
409 
410 struct meta_yes {
411  char a[1];
412 };
413 struct meta_no {
414  char a[2];
415 };
416 
417 // Check whether T::ReturnType does exist
418 template <typename T>
420  template <typename C>
421  static meta_yes testFunctor(C const*, typename C::ReturnType const* = 0);
422  template <typename C>
423  static meta_no testFunctor(...);
424 
425  enum { value = sizeof(testFunctor<T>(static_cast<T*>(0))) == sizeof(meta_yes) };
426 };
427 
428 template <typename T>
429 const T* return_ptr();
430 
431 template <typename T, typename IndexType = Index>
433  template <typename C>
434  static meta_yes testFunctor(C const*, std::enable_if_t<(sizeof(return_ptr<C>()->operator()()) > 0)>* = 0);
435  static meta_no testFunctor(...);
436 
437  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
438 };
439 
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);
444  static meta_no testFunctor(...);
445 
446  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
447 };
448 
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);
454  static meta_no testFunctor(...);
455 
456  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
457 };
458 
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)))>
464 class meta_sqrt {
465  enum {
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
470  };
471 
472  public:
474 };
475 
476 template <int Y, int InfX, int SupX>
477 class meta_sqrt<Y, InfX, SupX, true> {
478  public:
479  enum { ret = (SupX * SupX <= Y) ? SupX : InfX };
480 };
481 
485 template <int A, int B, int K = 1, bool Done = ((A * K) % B) == 0, bool Big = (A >= B)>
488 };
489 template <int A, int B, int K, bool Done>
490 struct meta_least_common_multiple<A, B, K, Done, false> {
492 };
493 template <int A, int B, int K>
494 struct meta_least_common_multiple<A, B, K, true, true> {
495  enum { ret = A * K };
496 };
497 
499 template <typename T, typename U>
501  enum { Defined = 0 };
502 };
503 
504 // FIXME quick workaround around current limitation of result_of
505 // template<typename Scalar, typename ArgType0, typename ArgType1>
506 // struct result_of<scalar_product_op<Scalar>(ArgType0,ArgType1)> {
507 // typedef typename scalar_product_traits<remove_all_t<ArgType0>, remove_all_t<ArgType1>>::ReturnType type;
508 // };
509 
513 template <unsigned Len, unsigned Align>
515  struct type {
516  EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len];
517  };
518 };
519 
520 } // end namespace internal
521 
522 template <typename T>
523 struct NumTraits;
524 
525 namespace numext {
526 
527 #if defined(EIGEN_GPU_COMPILE_PHASE)
528 template <typename T>
529 EIGEN_DEVICE_FUNC void swap(T& a, T& b) {
530  T tmp = b;
531  b = a;
532  a = tmp;
533 }
534 #else
535 template <typename T>
537  std::swap(a, b);
538 }
539 #endif
540 
541 using std::numeric_limits;
542 
543 // Handle integer comparisons of different signedness.
544 template <typename X, typename Y, bool XIsInteger = NumTraits<X>::IsInteger, bool XIsSigned = NumTraits<X>::IsSigned,
545  bool YIsInteger = NumTraits<Y>::IsInteger, bool YIsSigned = NumTraits<Y>::IsSigned>
547  static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X& x, const Y& y) { return x == y; }
548 };
549 template <typename X, typename Y>
550 struct equal_strict_impl<X, Y, true, false, true, true> {
551  // X is an unsigned integer
552  // Y is a signed integer
553  // if Y is non-negative, it may be represented exactly as its unsigned counterpart.
555  static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X& x, const Y& y) {
556  return y < Y(0) ? false : (x == static_cast<UnsignedY>(y));
557  }
558 };
559 template <typename X, typename Y>
560 struct equal_strict_impl<X, Y, true, true, true, false> {
561  // X is a signed integer
562  // Y is an unsigned integer
563  static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X& x, const Y& y) {
565  }
566 };
567 
568 // The aim of the following functions is to bypass -Wfloat-equal warnings
569 // when we really want a strict equality comparison on floating points.
570 template <typename X, typename Y>
573 }
574 
575 #if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
576 template <>
577 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const float& x, const float& y) {
578  return std::equal_to<float>()(x, y);
579 }
580 
581 template <>
582 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const double& x, const double& y) {
583  return std::equal_to<double>()(x, y);
584 }
585 #endif
586 
591 template <typename X>
593  return equal_strict(x, typename NumTraits<X>::Literal{0});
594 }
595 
600 template <typename X>
602  return equal_strict(x, typename NumTraits<X>::Literal{1});
603 }
604 
605 template <typename X, typename Y>
607  return !equal_strict_impl<X, Y>::run(x, y);
608 }
609 
610 #if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
611 template <>
612 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const float& x, const float& y) {
613  return std::not_equal_to<float>()(x, y);
614 }
615 
616 template <>
617 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const double& x, const double& y) {
618  return std::not_equal_to<double>()(x, y);
619 }
620 #endif
621 
622 } // end namespace numext
623 
624 namespace internal {
625 
626 template <typename Scalar>
628  static inline bool run(const Scalar& s) { return numext::is_exactly_zero(s); }
629 };
630 
631 template <typename Scalar>
634 }
635 
638 template <typename A>
640 
641 template <typename A, typename B>
642 inline constexpr void plain_enum_asserts(A, 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");
645 }
646 
648 template <typename A, typename B>
649 inline constexpr int plain_enum_min(A a, B b) {
651  return ((int)a <= (int)b) ? (int)a : (int)b;
652 }
653 
655 template <typename A, typename B>
656 inline constexpr int plain_enum_max(A a, B b) {
658  return ((int)a >= (int)b) ? (int)a : (int)b;
659 }
660 
667 template <typename A, typename B>
668 inline constexpr int min_size_prefer_dynamic(A a, B b) {
670  if ((int)a == 0 || (int)b == 0) return 0;
671  if ((int)a == 1 || (int)b == 1) return 1;
672  if ((int)a == Dynamic || (int)b == Dynamic) return Dynamic;
673  return plain_enum_min(a, b);
674 }
675 
682 template <typename A, typename B>
683 inline constexpr int min_size_prefer_fixed(A a, B b) {
685  if ((int)a == 0 || (int)b == 0) return 0;
686  if ((int)a == 1 || (int)b == 1) return 1;
687  if ((int)a == Dynamic && (int)b == Dynamic) return Dynamic;
688  if ((int)a == Dynamic) return (int)b;
689  if ((int)b == Dynamic) return (int)a;
690  return plain_enum_min(a, b);
691 }
692 
694 template <typename A, typename B>
695 inline constexpr int max_size_prefer_dynamic(A a, B b) {
697  if ((int)a == Dynamic || (int)b == Dynamic) return Dynamic;
698  return plain_enum_max(a, b);
699 }
700 
701 template <typename A, typename B>
702 inline constexpr bool enum_eq_not_dynamic(A a, B b) {
704  if ((int)a == Dynamic || (int)b == Dynamic) return false;
705  return (int)a == (int)b;
706 }
707 
708 template <typename A, typename B>
709 inline constexpr bool enum_lt_not_dynamic(A a, B b) {
711  if ((int)a == Dynamic || (int)b == Dynamic) return false;
712  return (int)a < (int)b;
713 }
714 
715 template <typename A, typename B>
716 inline constexpr bool enum_le_not_dynamic(A a, B b) {
718  if ((int)a == Dynamic || (int)b == Dynamic) return false;
719  return (int)a <= (int)b;
720 }
721 
722 template <typename A, typename B>
723 inline constexpr bool enum_gt_not_dynamic(A a, B b) {
725  if ((int)a == Dynamic || (int)b == Dynamic) return false;
726  return (int)a > (int)b;
727 }
728 
729 template <typename A, typename B>
730 inline constexpr bool enum_ge_not_dynamic(A a, B b) {
732  if ((int)a == Dynamic || (int)b == Dynamic) return false;
733  return (int)a >= (int)b;
734 }
735 
737 inline constexpr bool logical_xor(bool a, bool b) { return a != b; }
738 
740 inline constexpr bool check_implication(bool a, bool b) { return !a || b; }
741 
743 #if EIGEN_COMP_CXXVER >= 20
745 #else
746 constexpr bool is_constant_evaluated() { return false; }
747 #endif
748 
749 } // end namespace internal
750 
751 } // end namespace Eigen
752 
753 #endif // EIGEN_META_H
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
Definition: Meta.h:464
@ ret
Definition: Meta.h:473
Definition: Meta.h:281
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
return int(ret)+1
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
const T * return_ptr()
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
const T type
Definition: Meta.h:254
EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len]
Definition: Meta.h:514
Definition: Meta.h:305
static constexpr Index value
Definition: Meta.h:306
Definition: Meta.h:102
Definition: Meta.h:97
@ value
Definition: Meta.h:98
Definition: Meta.h:419
@ value
Definition: Meta.h:425
static meta_yes testFunctor(C const *, typename C::ReturnType const *=0)
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)
@ value
Definition: Meta.h:446
static meta_yes testFunctor(C const *, std::enable_if_t<(sizeof(return_ptr< C >() ->operator()(IndexType(0))) > 0)> *=0)
Definition: Meta.h:394
result_of< F(ArgTypes...)>::type type1
Definition: Meta.h:395
remove_all_t< type1 > type
Definition: Meta.h:396
Definition: Meta.h:145
@ value
Definition: Meta.h:146
Definition: Meta.h:244
static bool run(const Scalar &s)
Definition: Meta.h:628
Definition: Meta.h:205
@ value
Definition: Meta.h:206
Definition: Meta.h:214
Definition: Meta.h:413
char a[2]
Definition: Meta.h:414
Definition: Meta.h:410
char a[1]
Definition: Meta.h:411
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
Definition: Meta.h:117
T type
Definition: Meta.h:118
Definition: Meta.h:388
remove_all_t< type1 > type
Definition: Meta.h:390
std::result_of< T >::type type1
Definition: Meta.h:389
Definition: Meta.h:94
@ 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
Definition: Meta.h:546
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