VisionCpp
0.0.1
|
Contains standard layout tuple implementation. More...
Classes | |
struct | EnableIf |
The EnableIf struct is used to statically define type based on the condition. More... | |
struct | EnableIf< true, T > |
Specialisation of the EnableIf when the condition is matched. More... | |
struct | Tuple |
The tuple is a fixed-size collection of heterogeneous values. More... | |
struct | Tuple< T, Ts... > |
Specialisation of the Tuple class when it has at least one element. More... | |
struct | ElemTypeHolder |
ElemTypeHolder class is used to specify the types of the elements inside the tuple. More... | |
struct | ElemTypeHolder< 0, Tuple< T, Ts... > > |
Specialisation of the ElemTypeHolder class when the number of the elements inside the tuple is 1. More... | |
struct | ElemTypeHolder< k, Tuple< T, Ts... > > |
Specialisation of the ElemTypeHolder class when the number of the elements inside the tuple is bigger than 1. More... | |
struct | Index_list |
Creates a list of indices created for the elements in the tuple. More... | |
struct | RangeBuilder |
Specialisation of the RangeBuilder class when N!=MIN. More... | |
struct | RangeBuilder< MIN, MIN, Is... > |
Specialisation of the RangeBuilder when the MIN==MAX. More... | |
Typedefs | |
template<size_t MIN, size_t MAX> | |
using | Index_range = typename RangeBuilder< MIN, MAX >::type |
IndexRange that returns a index from range of [MIN, MAX). More... | |
Functions | |
template<size_t k, class... Ts> | |
EnableIf< k==0, typename ElemTypeHolder< 0, Tuple< Ts... > >::type & >::type | get (Tuple< Ts... > &t) |
get More... | |
template<size_t k, class T , class... Ts> | |
EnableIf< k !=0, typename ElemTypeHolder< k, Tuple< T, Ts... > >::type & >::type | get (Tuple< T, Ts... > &t) |
get More... | |
template<size_t k, class... Ts> | |
EnableIf< k==0, const typename ElemTypeHolder< 0, Tuple< Ts... > >::type & >::type | get (const Tuple< Ts... > &t) |
get More... | |
template<size_t k, class T , class... Ts> | |
EnableIf< k !=0, const typename ElemTypeHolder< k, Tuple< T, Ts... > >::type & >::type | get (const Tuple< T, Ts... > &t) |
get More... | |
template<typename... Args> | |
Tuple< Args... > | make_tuple (Args... args) |
make_tuple More... | |
template<typename... Args> | |
static constexpr size_t | size (Tuple< Args... > &) |
size More... | |
template<typename... Args, typename T , size_t... I> | |
Tuple< Args..., T > | append_impl (internal::tools::tuple::Tuple< Args... > t, T a, internal::tools::tuple::Index_list< I... >) |
append_impl More... | |
template<typename... Args, typename T > | |
Tuple< Args..., T > | append (Tuple< Args... > t, T a) |
append More... | |
template<typename... Args1, typename... Args2, size_t... I1, size_t... I2> | |
Tuple< Args1..., Args2... > | append_impl (internal::tools::tuple::Tuple< Args1... > t1, internal::tools::tuple::Tuple< Args2... > t2, internal::tools::tuple::Index_list< I1... >, internal::tools::tuple::Index_list< I2... >) |
append_impl More... | |
template<typename... Args1, typename... Args2> | |
Tuple< Args1..., Args2... > | append (internal::tools::tuple::Tuple< Args1... > t1, internal::tools::tuple::Tuple< Args2... > t2) |
append More... | |
Contains standard layout tuple implementation.
using visioncpp::internal::tools::tuple::Index_range = typedef typename RangeBuilder<MIN, MAX>::type |
Tuple<Args1..., Args2...> visioncpp::internal::tools::tuple::append | ( | internal::tools::tuple::Tuple< Args1... > | t1, |
internal::tools::tuple::Tuple< Args2... > | t2 | ||
) |
append
Deduction function of the append_impl for the append of the tuple t2 to the t1 tuple. The Index_range for both tuple is automatically generated.
Args1... | The type of the t1 tuple. |
Args2... | The type of the t2 tuple. |
t1 | Is the tuple on which we want to append the t2 tuple. |
t2 | Is the tuple to be appended. |
Definition at line 275 of file tuple.hpp.
References append_impl().
Tuple<Args..., T> visioncpp::internal::tools::tuple::append | ( | Tuple< Args... > | t, |
T | a | ||
) |
append
the deduction function for append_impl that automatically generates the Index_range.
Args... | the type of the elements inside the tuple t. |
T | the type of the new element that is going to be added at the end of the returned tuple. |
t | the tuple on which we want to append a. |
a | the new elements that are going to be added to the returned tuple. |
Definition at line 235 of file tuple.hpp.
References append_impl().
Referenced by visioncpp::internal::CreatePyramidTuple< SatisfyingConds, Cols, Rows, LeafType, Depth, CurrentDepth, LHS >::create_tuple(), visioncpp::internal::Device_< backend::sycl, dv >::execute(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, StnNoFilt< OP, Halo_T, Halo_L, Halo_B, Halo_R, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, RUnOP< OP, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, RDCN< OP, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, StnFilt< OP, Halo_T, Halo_L, Halo_B, Halo_R, LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, RBiOP< OP, LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple(), visioncpp::internal::ExtractAccessor< expr_category::Binary, Assign< LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple(), visioncpp::internal::ExtractAccessor< expr_category::Binary, Expr >::getTuple(), and visioncpp::internal::ExtractAccessor< expr_category::Binary, ParallelCopy< LHSExpr, RHSExpr, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LeafType, LVL > >::getTuple().
Tuple<Args..., T> visioncpp::internal::tools::tuple::append_impl | ( | internal::tools::tuple::Tuple< Args... > | t, |
T | a, | ||
internal::tools::tuple::Index_list< I... > | |||
) |
append_impl
Unpacks the elements of the input tuple t and creates a new tuple by adding the element a at the end of it.
Args... | the type of the elements inside the tuple t. |
T | the type of the new element that is going to be added at the end of the returned tuple. |
I... | is the list of indices from [0 to sizeof...(t)) range. |
t | the tuple on which we want to append a. |
a | the new elements that are going to be added to the returned tuple. |
Definition at line 220 of file tuple.hpp.
References make_tuple().
Referenced by append().
Tuple<Args1..., Args2...> visioncpp::internal::tools::tuple::append_impl | ( | internal::tools::tuple::Tuple< Args1... > | t1, |
internal::tools::tuple::Tuple< Args2... > | t2, | ||
internal::tools::tuple::Index_list< I1... > | , | ||
internal::tools::tuple::Index_list< I2... > | |||
) |
append_impl
This is a specialisation of the append_impl for the concatenation of the t2 tupe at the end of the t1 tuple. Both tuples are unpacked. Index_range is generated for each of them and output tuple T is created. The return tuple contains both elements of t1 and t2 tuples.
Args1... | The type of the t1 tuple. |
Args2... | The type of the t2 tuple. |
I1... | The list of the indices from [0 to sizeof...(t1)) range. |
I2... | The list of the indices from [0 to sizeof...(t2)) range. |
t1 | Is the tuple on which we want to append the t2 tuple. |
t2 | Is the tuple to be appended. |
Definition at line 254 of file tuple.hpp.
References make_tuple().
EnableIf< k != 0, const typename ElemTypeHolder<k, Tuple<T, Ts...> >::type &>::type visioncpp::internal::tools::tuple::get | ( | const Tuple< T, Ts... > & | t | ) |
get
Extracts the Kth element from the tuple when the tuple and all the elements inside are const.
K | is an integer value in [0,sizeof...(Types)) range. |
T | is the (sizeof...(Types) -(K+1)) element in the tuple. |
Ts... | are the elements type in the tuple. |
t | is the const tuple whose contents to extract. |
Definition at line 142 of file tuple.hpp.
References get(), and visioncpp::internal::tools::tuple::Tuple< T, Ts... >::tail.
EnableIf<k == 0, const typename ElemTypeHolder<0, Tuple<Ts...> >::type &>::type visioncpp::internal::tools::tuple::get | ( | const Tuple< Ts... > & | t | ) |
get
Extracts the first element from the tuple when the tuple and all the elements inside it are const. K=0 represents the first element of the tuple. The tuple cannot be empty.
Ts... | are the elements type in the tuple. |
t | is the const tuple whose contents to extract. |
EnableIf<k != 0, typename ElemTypeHolder<k, Tuple<T, Ts...> >::type &>::type visioncpp::internal::tools::tuple::get | ( | Tuple< T, Ts... > & | t | ) |
get
Extracts the Kth element from the tuple.
K | is an integer value in [0,sizeof...(Types)) range. |
T | is the (sizeof...(Types) -(K+1)) element in the tuple. |
Ts... | are the elements type in the tuple. |
t | is the tuple whose contents to extract. |
Definition at line 113 of file tuple.hpp.
References get(), and visioncpp::internal::tools::tuple::Tuple< T, Ts... >::tail.
EnableIf<k == 0, typename ElemTypeHolder<0, Tuple<Ts...> >::type &>::type visioncpp::internal::tools::tuple::get | ( | Tuple< Ts... > & | t | ) |
get
Extracts the first element from the tuple. K=0 represents the first element of the tuple. The tuple cannot be empty.
Ts... | are the elements type in the tuple. |
t | is the tuple whose contents to extract. |
Definition at line 99 of file tuple.hpp.
Referenced by visioncpp::internal::EvalExpr< LeafNode< PlaceHolder< Memory_Type, N, Cols, Rows, Sc >, LVL >, Loc, Params... >::eval_neighbour(), visioncpp::internal::EvalExpr< Assign< LHS, RHS, Cols, Rows, LfType, LVL >, Loc, Params... >::eval_neighbour(), get(), and visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::sub_expression_evaluation().
Tuple<Args...> visioncpp::internal::tools::tuple::make_tuple | ( | Args... | args | ) |
make_tuple
Creates a tuple object, deducing the target type from the types of the arguments.
Args | the type of the arguments to construct the tuple from. |
args | zero or more arguments to construct the tuple from. |
Definition at line 153 of file tuple.hpp.
Referenced by append_impl(), visioncpp::internal::CreatePyramidTuple< true, Cols, Rows, LeafType, Depth, CurrentDepth, LHS >::create_tuple(), visioncpp::internal::CreatePyramidTuple< SatisfyingConds, Cols, Rows, LeafType, Depth, CurrentDepth, LHS >::create_tuple(), visioncpp::internal::LocalOutput< PointOp, IsRoot, LC, LR, Expr >::getTuple(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, LeafNode< VisionMemory< in, element_category, memory_type::Const, Sclr, Width, Height, Sclr, 1, scope::Global, LVL >, LVL > >::getTuple(), visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, LeafNode< VisionMemory< in, element_category, Memory_Type, Scalar, Width, Height, ElementTp, Elements, scope::Constant, LVL >, LVL > >::getTuple(), visioncpp::internal::OutputAccessor< IsRoot, LeafType, LC, LR, OutType >::getTuple(), and visioncpp::pixel::Storage< LHSScalar, Channels >::Storage().
|
staticconstexpr |
size
Returns the number of the elements in the tuple as a compile-time expression.
Args | the type of the arguments to construct the tuple from. |
Definition at line 163 of file tuple.hpp.
Referenced by visioncpp::internal::Device_< backend::sycl, dv >::execute().