10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_META_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_META_H 15 template<
bool cond>
struct Cond {};
28 template <
typename T,
typename X,
typename Y>
31 return static_cast<T
>((x + y - 1) / y);
37 return static_cast<T
>((x + y - 1) / y);
41 static const size_t size = n;
44 static const size_t size = 1;
49 template <
typename Scalar,
typename Device>
55 #if defined(EIGEN_USE_GPU) && defined(__CUDACC__) && defined(EIGEN_HAS_CUDA_FP16) 59 static const int size = 2;
86 #if defined(EIGEN_USE_SYCL) 90 static const int size = 1;
110 template <
typename U,
typename V>
struct Tuple {
122 Tuple(
const U&
f,
const V& s) : first(f), second(s) {}
126 if (&rhs ==
this)
return *
this;
140 template <
typename U,
typename V>
146 template <
typename U,
typename V>
168 #ifdef EIGEN_HAS_SFINAE 171 template<
typename IndexType,
Index... Is>
173 array<
Index,
sizeof...(Is)> customIndices2Array(IndexType& idx, numeric_list<Index, Is...>) {
174 return { idx[Is]... };
176 template<
typename IndexType>
183 template<
typename Index, std::
size_t NumIndices,
typename IndexType>
186 return customIndices2Array(idx,
typename gen_numeric_list<Index, NumIndices>::type{});
190 template <
typename B,
typename D>
194 typedef char (&yes)[1];
195 typedef char (&no)[2];
197 template <
typename BB,
typename DD>
200 operator BB*()
const;
205 static yes
check(D*, T);
206 static no check(B*,
int);
208 static const bool value =
sizeof(check(Host<B,D>(),
int())) ==
sizeof(yes);
218 #endif // EIGEN_CXX11_TENSOR_TENSOR_META_H
#define EIGEN_ALWAYS_INLINE
#define EIGEN_STRONG_INLINE
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator==(const Tuple< U, V > &x, const Tuple< U, V > &y)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const T1 & choose(Cond< true >, const T1 &first, const T2 &)
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
EIGEN_STRONG_INLINE void swap(T &a, T &b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair(Idx f, Idx s)
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(Tuple &rhs)
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tuple(const U &f, const V &s)
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator!=(const Tuple< U, V > &x, const Tuple< U, V > &y)
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tuple()
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T divup(const X x, const Y y)
internal::packet_traits< Scalar >::type type
void swap(scoped_array< T > &a, scoped_array< T > &b)