SUNphi  1.0
IntSeqGetEl.hpp File Reference

Gets element from an IntSeq according to specific pattern. More...

Go to the source code of this file.

Typedefs

template<int N, typename Is >
using SUNphi::IntSeqGetAllButFirstN = decltype(_IntSeqGetAllButFirstN< N >(Is{}))
 
template<typename Is >
using SUNphi::IntSeqGetAllButFirst = IntSeqGetAllButFirstN< 1, Is >
 Returns all the IntSeq but the first element.
 
template<int Tail, bool ReturnNotPresent, typename Pos , typename Head >
using SUNphi::IntSeqGetElsAfterAppending = decltype(_IntSeqGetElsAfterAppending< Tail, ReturnNotPresent >(Pos{}, Head{}))
 

Functions

template<int N, int Head, int... Tail>
decltype(auto) SUNphi::_IntSeqGetAllButFirstN (IntSeq< Head, Tail... >)
 
template<int Tail, bool ReturnNotPresent, int Pos, int... Head>
decltype(auto) constexpr SUNphi::_IntSeqGetElAfterAppending (IntSeq< Head... >)
 
template<int Tail, bool ReturnNotPresent, int... Pos, int... Head>
decltype(auto) SUNphi::_IntSeqGetElsAfterAppending (IntSeq< Pos... >, IntSeq< Head... >)
 

Detailed Description

Gets element from an IntSeq according to specific pattern.

Definition in file IntSeqGetEl.hpp.

Typedef Documentation

template<int N, typename Is >
using SUNphi::IntSeqGetAllButFirstN = typedef decltype(_IntSeqGetAllButFirstN<N>(Is{}))

Returns all the IntSeq but the first N elements

Gives visibility to the internal implementation

Definition at line 38 of file IntSeqGetEl.hpp.

template<int Tail, bool ReturnNotPresent, typename Pos , typename Head >
using SUNphi::IntSeqGetElsAfterAppending = typedef decltype(_IntSeqGetElsAfterAppending<Tail,ReturnNotPresent>(Pos{},Head{}))

Modified extraction of an element in an IntSeq after appending a value

Returns an IntSeq containing the element of all positions Pos in the passed IntSeq, after appending a given value to it. If asked, all the NOT_PRESENT are replaced with empty value.

Definition at line 101 of file IntSeqGetEl.hpp.

Function Documentation

template<int N, int Head, int... Tail>
decltype(auto) SUNphi::_IntSeqGetAllButFirstN ( IntSeq< Head, Tail... >  )

Returns all the IntSeq but the first N elements

Recursive internal implementation

Definition at line 19 of file IntSeqGetEl.hpp.

template<int Tail, bool ReturnNotPresent, int Pos, int... Head>
decltype(auto) constexpr SUNphi::_IntSeqGetElAfterAppending ( IntSeq< Head... >  )

Modified extraction of an element in an IntSeq after appending a value

Returns an IntSeq containing the element of position Pos in the passed IntSeq, after appending a given value to it. If asked, the returned NOT_PRESENT is replaced with empty value.

int a=
posInIntSeqAfterAppending<2,4>(IntSeq<0,1,2,3){}>; // 2

Full IntSeq to be searched

Element search return

Definition at line 61 of file IntSeqGetEl.hpp.

template<int Tail, bool ReturnNotPresent, int... Pos, int... Head>
decltype(auto) SUNphi::_IntSeqGetElsAfterAppending ( IntSeq< Pos... >  ,
IntSeq< Head... >   
)

Modified extraction of an element in an IntSeq after appending a value

Internal implementation

Definition at line 85 of file IntSeqGetEl.hpp.