21 #ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_TUPLE_HPP 22 #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_TUPLE_HPP 28 template <
bool,
typename T =
void>
struct StaticIf;
39 template <
class... Ts>
46 template <
class T,
class... Ts>
58 template <
size_t,
class>
63 template <
class T,
class... Ts>
74 template <
size_t k,
class T,
class... Ts>
86 #define TERMINATE_CONDS_TUPLE_GET(CVQual) \ 87 template <size_t k, class... Ts> \ 88 typename StaticIf<k == 0, CVQual typename ElemTypeHolder<0, Tuple<Ts...> >::type &>::type \ 89 get(CVQual Tuple<Ts...> &t) { \ 90 static_assert(sizeof...(Ts)!=0, "The requseted value is bigger than the size of the tuple"); \ 96 #undef TERMINATE_CONDS_TUPLE_GET 97 #define RECURSIVE_TUPLE_GET(CVQual) \ 105 template <size_t k, class T, class... Ts> \ 106 typename StaticIf<k != 0, CVQual typename ElemTypeHolder<k, Tuple<T, Ts...> >::type &>::type \ 107 get(CVQual Tuple<T, Ts...> &t) { \ 108 return utility::tuple::get<k - 1>(t.tail); \ 112 #undef RECURSIVE_TUPLE_GET 120 template <
typename... Args>
130 template <
typename... Args>
132 return sizeof...(Args);
138 template <
size_t... Is>
147 template <
size_t MIN,
size_t N,
size_t... Is>
151 #ifndef EIGEN_PARSED_BY_DOXYGEN 152 template <
size_t MIN,
size_t... Is>
167 template <
size_t MIN,
size_t N,
size_t... Is>
169 #endif // EIGEN_PARSED_BY_DOXYGEN 174 template <
size_t MIN,
size_t MAX>
186 template <
typename... Args,
typename T,
size_t...
I>
199 template <
typename... Args,
typename T>
217 template <
typename... Args1,
typename... Args2,
size_t... I1,
size_t... I2>
231 template <
typename... Args1,
typename... Args2>
237 #endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_TUPLE_HPP The StaticIf struct is used to statically choose the type based on the condition. ...
ElemTypeHolder class is used to specify the types of the elements inside the tuple.
EIGEN_DEVICE_FUNC SegmentReturnType tail(Index n)
This is the const version of tail(Index).
Collects internal details for generating index ranges [MIN, MAX) Declare primary template for index r...
Tuple< Args..., T > append_base(Tuple< Args... > t, T a, IndexList< I... >)
unpacking the elements of the input tuple t and creating a new tuple by adding element a at the end o...
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
Tuple< Args..., T > append(Tuple< Args... > t, T a)
the deduction function for append_base that automatically generate the IndexRange ...
ElemTypeHolder< k-1, Tuple< Ts... > >::type type
IndexRange that returns a [MIN, MAX) index range.
Tuple< Args... > make_tuple(Args...args)
Creates a tuple object, deducing the target type from the types of arguments.
is a fixed-size collection of heterogeneous values
#define TERMINATE_CONDS_TUPLE_GET(CVQual)
Extracts the first element from the tuple. K=0 represents the first element of the tuple...
Eigen::Triplet< double > T
#define RECURSIVE_TUPLE_GET(CVQual)
Extracts the Kth element from the tuple.
EIGEN_DEVICE_FUNC SegmentReturnType head(Index n)
This is the const version of head(Index).
Creates a list of index from the elements in the tuple.