10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_META_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_META_H
15 template<
bool cond>
struct Cond {};
17 template<
typename T1,
typename T2> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
18 const T1& choose(Cond<true>,
const T1& first,
const T2&) {
22 template<
typename T1,
typename T2> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
23 const T2& choose(Cond<false>,
const T1&,
const T2& second) {
27 template <
size_t n>
struct max_n_1 {
28 static const size_t size = n;
30 template <>
struct max_n_1<0> {
31 static const size_t size = 1;
37 #if defined(EIGEN_HAS_CONSTEXPR)
38 #define EIGEN_CONSTEXPR constexpr
40 #define EIGEN_CONSTEXPR
44 template <
typename U,
typename V>
struct Tuple {
50 typedef V second_type;
52 EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
53 Tuple() : first(), second() {}
55 EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
56 Tuple(
const U& f,
const V& s) : first(f), second(s) {}
58 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
59 Tuple& operator= (
const Tuple& rhs) {
60 if (&rhs ==
this)
return *
this;
66 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
67 void swap(Tuple& rhs) {
69 swap(first, rhs.first);
70 swap(second, rhs.second);
74 template <
typename U,
typename V>
75 EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
76 bool operator==(
const Tuple<U, V>& x,
const Tuple<U, V>& y) {
77 return (x.first == y.first && x.second == y.second);
80 template <
typename U,
typename V>
81 EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
82 bool operator!=(
const Tuple<U, V>& x,
const Tuple<U, V>& y) {
86 #undef EIGEN_CONSTEXPR
90 #endif // EIGEN_CXX11_TENSOR_TENSOR_META_H
Namespace containing all symbols from the Eigen library.
Definition: CXX11Meta.h:13