Classes | Namespaces | Macros | Functions
TensorSyclTuple.h File Reference

Go to the source code of this file.

Classes

struct  utility::tuple::ElemTypeHolder< size_t, class >
 ElemTypeHolder class is used to specify the types of the elements inside the tuple. More...
 
struct  utility::tuple::ElemTypeHolder< 0, Tuple< T, Ts... > >
 specialisation of the ElemTypeHolder class when the number of elements inside the tuple is 1 More...
 
struct  utility::tuple::ElemTypeHolder< k, Tuple< T, Ts... > >
 specialisation of the ElemTypeHolder class when the number of elements inside the tuple is bigger than 1. It recursively calls itself to detect the type of each element in the tuple More...
 
struct  utility::tuple::IndexList< Is >
 Creates a list of index from the elements in the tuple. More...
 
struct  utility::tuple::IndexRange< MIN, MAX >
 IndexRange that returns a [MIN, MAX) index range. More...
 
struct  utility::tuple::RangeBuilder< MIN, N, Is >
 Collects internal details for generating index ranges [MIN, MAX) Declare primary template for index range builder. More...
 
struct  utility::tuple::RangeBuilder< MIN, N, Is >
 Collects internal details for generating index ranges [MIN, MAX) Declare primary template for index range builder. More...
 
struct  utility::tuple::RangeBuilder< MIN, MIN, Is... >
 base Step: Specialisation of the RangeBuilder when the MIN==MAX. In this case the Is... is [0 to sizeof...(tuple elements)) More...
 
struct  utility::tuple::StaticIf< bool, T >
 The StaticIf struct is used to statically choose the type based on the condition. More...
 
struct  utility::tuple::StaticIf< true, T >
 specialisation of the StaticIf when the condition is true More...
 
struct  utility::tuple::Tuple< Ts >
 is a fixed-size collection of heterogeneous values Ts... - the types of the elements that the tuple stores. Empty list is supported. More...
 
struct  utility::tuple::Tuple< T, Ts... >
 specialisation of the Tuple class when the tuple has at least one element. More...
 

Namespaces

 utility
 
 utility::tuple
 

Macros

#define RECURSIVE_TUPLE_GET(CVQual)
 Extracts the Kth element from the tuple. More...
 
#define TERMINATE_CONDS_TUPLE_GET(CVQual)
 Extracts the first element from the tuple. K=0 represents the first element of the tuple. The tuple cannot be empty. More...
 

Functions

template<typename... Args, typename T >
Tuple< Args..., T > utility::tuple::append (Tuple< Args... > t, T a)
 the deduction function for append_base that automatically generate the IndexRange More...
 
template<typename... Args1, typename... Args2>
Tuple< Args1..., Args2... > utility::tuple::append (Tuple< Args1... > t1, Tuple< Args2... > t2)
 deduction function for append_base when we are appending tuple t1 by tuple t2. In this case the IndexRange for both tuple are automatically generated. More...
 
template<typename... Args, typename T , size_t... I>
Tuple< Args..., T > utility::tuple::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 of it. More...
 
template<typename... Args1, typename... Args2, size_t... I1, size_t... I2>
Tuple< Args1..., Args2... > utility::tuple::append_base (Tuple< Args1... > t1, Tuple< Args2... > t2, IndexList< I1... >, IndexList< I2... >)
 This is a specialisation of append_base when we want to concatenate tuple t2 at the end of the tuple t1. Here we unpack both tuples, generate the IndexRange for each of them and create an output tuple T that contains both elements of t1 and t2. More...
 
template<typename... Args>
Tuple< Args... > utility::tuple::make_tuple (Args...args)
 Creates a tuple object, deducing the target type from the types of arguments. More...
 
template<typename... Args>
static constexpr size_t utility::tuple::size (Tuple< Args... > &)
 Provides access to the number of elements in a tuple as a compile-time constant expression. More...
 

Macro Definition Documentation

#define RECURSIVE_TUPLE_GET (   CVQual)
Value:
template <size_t k, class T, class... Ts> \
typename StaticIf<k != 0, CVQual typename ElemTypeHolder<k, Tuple<T, Ts...> >::type &>::type \
get(CVQual Tuple<T, Ts...> &t) { \
return utility::tuple::get<k - 1>(t.tail); \
}
return(x<=y?ADS(x):ADS(y))

Extracts the Kth element from the tuple.

get

Template Parameters
Kis an integer value in [0,sizeof...(Types)).
Tis the (sizeof...(Types) -(K+1)) element in the tuple
Ts...are the type of the elements in the tuple.
Parameters
tis the tuple whose contents to extract
Returns
typename ElemTypeHolder<K, Tuple<Ts...> >::type &>::type

Definition at line 104 of file TensorSyclTuple.h.

#define TERMINATE_CONDS_TUPLE_GET (   CVQual)
Value:
template <size_t k, class... Ts> \
typename StaticIf<k == 0, CVQual typename ElemTypeHolder<0, Tuple<Ts...> >::type &>::type \
get(CVQual Tuple<Ts...> &t) { \
static_assert(sizeof...(Ts)!=0, "The requseted value is bigger than the size of the tuple"); \
return t.head; \
}
return(x<=y?ADS(x):ADS(y))

Extracts the first element from the tuple. K=0 represents the first element of the tuple. The tuple cannot be empty.

get

Template Parameters
Ts...are the type of the elements in the tuple.
Parameters
tis the tuple whose contents to extract
Returns
typename ElemTypeHolder<0, Tuple<Ts...> >::type &>::type

Definition at line 86 of file TensorSyclTuple.h.



hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:09:50