20 #ifndef RAJA_FORALLN_PERMUTATIONS_HPP
21 #define RAJA_FORALLN_PERMUTATIONS_HPP
23 #include "RAJA/config.hpp"
27 #include "camp/camp.hpp"
32 template<
typename Indices>
35 template<camp::idx_t... Indices>
40 return {{Indices...}};
202 template<camp::
idx_t I, camp::
idx_t J, camp::
idx_t N,
typename Perm>
205 static constexpr camp::idx_t
value =
206 camp::seq_at<J, Perm>::value == I
211 template<camp::
idx_t I, camp::
idx_t N,
typename Perm>
214 static constexpr camp::idx_t
value = I;
218 template<
typename Range,
typename Perm>
221 template<camp::idx_t... Range, camp::idx_t...
Perm>
224 static_assert(
sizeof...(Range) ==
sizeof...(
Perm),
"Fatal Error");
229 camp::idx_seq<Perm...>>::value...>;
238 template<
typename Perm>
240 camp::make_idx_seq_t<camp::size<Perm>::value>,
Definition: AlignedRangeIndexSetBuilders.cpp:35
camp::idx_seq< 0, 3, 1, 4, 2 > PERM_ILJMK
Definition: Permutations.hpp:90
camp::idx_seq< 2, 4, 1, 3, 0 > PERM_KMJLI
Definition: Permutations.hpp:146
camp::idx_seq< 3, 0, 1, 2, 4 > PERM_LIJKM
Definition: Permutations.hpp:149
camp::idx_seq< 3, 1, 0, 2 > PERM_LJIK
Definition: Permutations.hpp:73
camp::idx_seq< 3, 4, 2, 1, 0 > PERM_LMKJI
Definition: Permutations.hpp:172
camp::idx_seq< 1, 2, 4, 3, 0 > PERM_JKMLI
Definition: Permutations.hpp:112
camp::idx_seq< 4, 2, 3, 1, 0 > PERM_MKLJI
Definition: Permutations.hpp:190
camp::idx_seq< 2, 0, 3, 1 > PERM_KILJ
Definition: Permutations.hpp:66
camp::idx_seq< 0, 2, 1, 3 > PERM_IKJL
Definition: Permutations.hpp:55
camp::idx_seq< 3, 2, 4, 1, 0 > PERM_LKMJI
Definition: Permutations.hpp:166
camp::idx_seq< 3, 4, 2, 0, 1 > PERM_LMKIJ
Definition: Permutations.hpp:171
camp::idx_seq< 0, 2, 1, 4, 3 > PERM_IKJML
Definition: Permutations.hpp:84
camp::idx_seq< 0, 3, 1, 2, 4 > PERM_ILJKM
Definition: Permutations.hpp:89
camp::idx_seq< 2, 3, 0, 4, 1 > PERM_KLIMJ
Definition: Permutations.hpp:138
camp::idx_seq< 4, 3, 2, 0, 1 > PERM_MLKIJ
Definition: Permutations.hpp:195
camp::idx_seq< 2, 4, 3, 0, 1 > PERM_KMLIJ
Definition: Permutations.hpp:147
camp::idx_seq< 3, 4, 1, 2, 0 > PERM_LMJKI
Definition: Permutations.hpp:170
camp::idx_seq< 1, 4, 0, 3, 2 > PERM_JMILK
Definition: Permutations.hpp:120
camp::idx_seq< 0, 3, 2, 1 > PERM_ILKJ
Definition: Permutations.hpp:58
camp::idx_seq< 2, 3, 0, 1, 4 > PERM_KLIJM
Definition: Permutations.hpp:137
camp::idx_seq< 1, 2, 4, 0, 3 > PERM_JKMIL
Definition: Permutations.hpp:111
camp::idx_seq< 2, 3, 4, 0, 1 > PERM_KLMIJ
Definition: Permutations.hpp:141
camp::idx_seq< 2, 3, 0, 1 > PERM_KLIJ
Definition: Permutations.hpp:69
camp::idx_seq< 0, 1, 4, 2, 3 > PERM_IJMKL
Definition: Permutations.hpp:81
camp::idx_seq< 0, 2, 3, 4, 1 > PERM_IKLMJ
Definition: Permutations.hpp:86
camp::idx_seq< 0, 1, 4, 3, 2 > PERM_IJMLK
Definition: Permutations.hpp:82
camp::idx_seq< 2, 0, 4, 3, 1 > PERM_KIMLJ
Definition: Permutations.hpp:130
camp::idx_seq< 4, 3, 0, 2, 1 > PERM_MLIKJ
Definition: Permutations.hpp:192
camp::idx_seq< 4, 3, 0, 1, 2 > PERM_MLIJK
Definition: Permutations.hpp:191
camp::idx_seq< 2, 3, 1, 0 > PERM_KLJI
Definition: Permutations.hpp:70
camp::idx_seq< 2, 0, 1 > PERM_KIJ
Definition: Permutations.hpp:51
camp::idx_seq< 4, 2, 0, 3, 1 > PERM_MKILJ
Definition: Permutations.hpp:186
camp::idx_seq< 3, 2, 1, 0, 4 > PERM_LKJIM
Definition: Permutations.hpp:163
camp::idx_seq< 1, 2, 3, 4, 0 > PERM_JKLMI
Definition: Permutations.hpp:110
camp::idx_seq< 4, 0, 1, 2, 3 > PERM_MIJKL
Definition: Permutations.hpp:173
camp::idx_seq< 2, 1, 0, 3 > PERM_KJIL
Definition: Permutations.hpp:67
camp::idx_seq< 3, 2, 1, 4, 0 > PERM_LKJMI
Definition: Permutations.hpp:164
camp::idx_seq< 1, 0, 3, 2 > PERM_JILK
Definition: Permutations.hpp:60
camp::idx_seq< 4, 1, 3, 2, 0 > PERM_MJLKI
Definition: Permutations.hpp:184
camp::idx_seq< 1, 3, 0, 4, 2 > PERM_JLIMK
Definition: Permutations.hpp:114
camp::idx_seq< 0, 4, 1, 3, 2 > PERM_IMJLK
Definition: Permutations.hpp:96
camp::idx_seq< 2, 0, 3, 4, 1 > PERM_KILMJ
Definition: Permutations.hpp:128
camp::idx_seq< 4, 3, 2, 1, 0 > PERM_MLKJI
Definition: Permutations.hpp:196
camp::idx_seq< 1, 4, 2, 0, 3 > PERM_JMKIL
Definition: Permutations.hpp:121
camp::idx_seq< 4, 2, 1, 0, 3 > PERM_MKJIL
Definition: Permutations.hpp:187
camp::idx_seq< 3, 0, 2, 1, 4 > PERM_LIKJM
Definition: Permutations.hpp:151
camp::idx_seq< 3, 0, 1, 2 > PERM_LIJK
Definition: Permutations.hpp:71
camp::idx_seq< 1, 0, 3, 4, 2 > PERM_JILMK
Definition: Permutations.hpp:104
camp::idx_seq< 0, 3, 2, 1, 4 > PERM_ILKJM
Definition: Permutations.hpp:91
camp::idx_seq< 2, 4, 0, 1, 3 > PERM_KMIJL
Definition: Permutations.hpp:143
camp::idx_seq< 3, 4, 1, 0, 2 > PERM_LMJIK
Definition: Permutations.hpp:169
camp::idx_seq< 1, 2, 0, 3, 4 > PERM_JKILM
Definition: Permutations.hpp:107
camp::idx_seq< 2, 1, 3, 0, 4 > PERM_KJLIM
Definition: Permutations.hpp:133
camp::idx_seq< 4, 0, 2, 1, 3 > PERM_MIKJL
Definition: Permutations.hpp:175
camp::idx_seq< 3, 2, 0, 1, 4 > PERM_LKIJM
Definition: Permutations.hpp:161
camp::idx_seq< 1, 0 > PERM_JI
Definition: Permutations.hpp:46
camp::idx_seq< 0, 1, 2, 3 > PERM_IJKL
Definition: Permutations.hpp:53
camp::idx_seq< 0, 3, 2, 4, 1 > PERM_ILKMJ
Definition: Permutations.hpp:92
camp::idx_seq< 3, 1, 2, 4, 0 > PERM_LJKMI
Definition: Permutations.hpp:158
camp::idx_seq< 4, 0, 3, 1, 2 > PERM_MILJK
Definition: Permutations.hpp:177
camp::idx_seq< 1, 2, 0 > PERM_JKI
Definition: Permutations.hpp:50
camp::idx_seq< 3, 1, 4, 2, 0 > PERM_LJMKI
Definition: Permutations.hpp:160
camp::idx_seq< 4, 2, 0, 1, 3 > PERM_MKIJL
Definition: Permutations.hpp:185
camp::idx_seq< 1, 3, 2, 0, 4 > PERM_JLKIM
Definition: Permutations.hpp:115
camp::idx_seq< 2, 1, 4, 3, 0 > PERM_KJMLI
Definition: Permutations.hpp:136
camp::idx_seq< 3, 0, 4, 1, 2 > PERM_LIMJK
Definition: Permutations.hpp:153
camp::idx_seq< 2, 0, 1, 4, 3 > PERM_KIJML
Definition: Permutations.hpp:126
camp::idx_seq< 1, 2, 3, 0 > PERM_JKLI
Definition: Permutations.hpp:62
camp::idx_seq< 1, 3, 2, 0 > PERM_JLKI
Definition: Permutations.hpp:64
camp::idx_seq< 0, 4, 2, 3, 1 > PERM_IMKLJ
Definition: Permutations.hpp:98
std::ptrdiff_t Index_type
Definition: types.hpp:226
camp::idx_seq< 4, 0, 1, 3, 2 > PERM_MIJLK
Definition: Permutations.hpp:174
camp::idx_seq< 4, 1, 3, 0, 2 > PERM_MJLIK
Definition: Permutations.hpp:183
camp::idx_seq< 0, 3, 1, 2 > PERM_ILJK
Definition: Permutations.hpp:57
camp::idx_seq< 1, 0, 2 > PERM_JIK
Definition: Permutations.hpp:49
camp::idx_seq< 3, 1, 0, 2, 4 > PERM_LJIKM
Definition: Permutations.hpp:155
camp::idx_seq< 0, 3, 4, 2, 1 > PERM_ILMKJ
Definition: Permutations.hpp:94
camp::idx_seq< 0, 1, 3, 2, 4 > PERM_IJLKM
Definition: Permutations.hpp:79
camp::idx_seq< 2, 1, 0, 4, 3 > PERM_KJIML
Definition: Permutations.hpp:132
camp::idx_seq< 0, 3, 4, 1, 2 > PERM_ILMJK
Definition: Permutations.hpp:93
camp::idx_seq< 2, 1, 4, 0, 3 > PERM_KJMIL
Definition: Permutations.hpp:135
camp::idx_seq< 3, 2, 0, 1 > PERM_LKIJ
Definition: Permutations.hpp:75
camp::idx_seq< 2, 1, 3, 0 > PERM_KJLI
Definition: Permutations.hpp:68
camp::idx_seq< 1, 4, 0, 2, 3 > PERM_JMIKL
Definition: Permutations.hpp:119
camp::idx_seq< 3, 4, 0, 1, 2 > PERM_LMIJK
Definition: Permutations.hpp:167
camp::idx_seq< 3, 1, 2, 0 > PERM_LJKI
Definition: Permutations.hpp:74
camp::idx_seq< 1, 0, 2, 4, 3 > PERM_JIKML
Definition: Permutations.hpp:102
camp::idx_seq< 4, 3, 1, 0, 2 > PERM_MLJIK
Definition: Permutations.hpp:193
camp::idx_seq< 2, 4, 0, 3, 1 > PERM_KMILJ
Definition: Permutations.hpp:144
camp::idx_seq< 2, 3, 1, 4, 0 > PERM_KLJMI
Definition: Permutations.hpp:140
camp::idx_seq< 0, 1, 2, 3, 4 > PERM_IJKLM
Definition: Permutations.hpp:77
camp::idx_seq< 4, 2, 1, 3, 0 > PERM_MKJLI
Definition: Permutations.hpp:188
camp::idx_seq< 1, 4, 3, 2, 0 > PERM_JMLKI
Definition: Permutations.hpp:124
camp::idx_seq< 1, 2, 0, 4, 3 > PERM_JKIML
Definition: Permutations.hpp:108
camp::idx_seq< 3, 1, 4, 0, 2 > PERM_LJMIK
Definition: Permutations.hpp:159
camp::idx_seq< 3, 2, 0, 4, 1 > PERM_LKIMJ
Definition: Permutations.hpp:162
camp::idx_seq< 0, 2, 4, 1, 3 > PERM_IKMJL
Definition: Permutations.hpp:87
camp::idx_seq< 4, 1, 2, 0, 3 > PERM_MJKIL
Definition: Permutations.hpp:181
camp::idx_seq< 1, 0, 2, 3 > PERM_JIKL
Definition: Permutations.hpp:59
camp::idx_seq< 1, 4, 3, 0, 2 > PERM_JMLIK
Definition: Permutations.hpp:123
camp::idx_seq< 0, 4, 1, 2, 3 > PERM_IMJKL
Definition: Permutations.hpp:95
camp::idx_seq< 0, 4, 3, 2, 1 > PERM_IMLKJ
Definition: Permutations.hpp:100
camp::idx_seq< 4, 3, 1, 2, 0 > PERM_MLJKI
Definition: Permutations.hpp:194
camp::idx_seq< 3, 1, 0, 4, 2 > PERM_LJIMK
Definition: Permutations.hpp:156
camp::idx_seq< 2, 0, 1, 3, 4 > PERM_KIJLM
Definition: Permutations.hpp:125
camp::idx_seq< 1, 0, 2, 3, 4 > PERM_JIKLM
Definition: Permutations.hpp:101
camp::idx_seq< 0, 2, 3, 1, 4 > PERM_IKLJM
Definition: Permutations.hpp:85
camp::idx_seq< 2, 4, 1, 0, 3 > PERM_KMJIL
Definition: Permutations.hpp:145
camp::idx_seq< 4, 0, 3, 2, 1 > PERM_MILKJ
Definition: Permutations.hpp:178
camp::idx_seq< 0, 2, 4, 3, 1 > PERM_IKMLJ
Definition: Permutations.hpp:88
camp::idx_seq< 4, 1, 0, 2, 3 > PERM_MJIKL
Definition: Permutations.hpp:179
camp::idx_seq< 4, 1, 2, 3, 0 > PERM_MJKLI
Definition: Permutations.hpp:182
camp::idx_seq< 1, 2, 3, 0, 4 > PERM_JKLIM
Definition: Permutations.hpp:109
camp::idx_seq< 1, 0, 4, 2, 3 > PERM_JIMKL
Definition: Permutations.hpp:105
camp::idx_seq< 1, 0, 4, 3, 2 > PERM_JIMLK
Definition: Permutations.hpp:106
camp::idx_seq< 2, 0, 4, 1, 3 > PERM_KIMJL
Definition: Permutations.hpp:129
camp::idx_seq< 3, 0, 4, 2, 1 > PERM_LIMKJ
Definition: Permutations.hpp:154
camp::idx_seq< 0, 1 > PERM_IJ
Definition: Permutations.hpp:45
camp::idx_seq< 3, 0, 2, 4, 1 > PERM_LIKMJ
Definition: Permutations.hpp:152
camp::idx_seq< 2, 1, 0, 3, 4 > PERM_KJILM
Definition: Permutations.hpp:131
camp::idx_seq< 1, 0, 3, 2, 4 > PERM_JILKM
Definition: Permutations.hpp:103
camp::idx_seq< 0 > PERM_I
Definition: Permutations.hpp:44
typename internal::InversePermutationHelper< camp::make_idx_seq_t< camp::size< Perm >::value >, Perm >::type invert_permutation
Definition: Permutations.hpp:241
camp::idx_seq< 3, 0, 1, 4, 2 > PERM_LIJMK
Definition: Permutations.hpp:150
camp::idx_seq< 1, 3, 2, 4, 0 > PERM_JLKMI
Definition: Permutations.hpp:116
camp::idx_seq< 2, 4, 3, 1, 0 > PERM_KMLJI
Definition: Permutations.hpp:148
camp::idx_seq< 2, 3, 4, 1, 0 > PERM_KLMJI
Definition: Permutations.hpp:142
camp::idx_seq< Ints... > Perm
Definition: PermutedLayout.hpp:101
camp::idx_seq< 0, 4, 3, 1, 2 > PERM_IMLJK
Definition: Permutations.hpp:99
camp::idx_seq< 3, 2, 1, 0 > PERM_LKJI
Definition: Permutations.hpp:76
camp::idx_seq< 2, 1, 0 > PERM_KJI
Definition: Permutations.hpp:52
camp::idx_seq< 0, 2, 1, 3, 4 > PERM_IKJLM
Definition: Permutations.hpp:83
camp::idx_seq< 1, 3, 0, 2 > PERM_JLIK
Definition: Permutations.hpp:63
camp::idx_seq< 1, 4, 2, 3, 0 > PERM_JMKLI
Definition: Permutations.hpp:122
camp::idx_seq< 3, 1, 2, 0, 4 > PERM_LJKIM
Definition: Permutations.hpp:157
camp::idx_seq< 2, 3, 1, 0, 4 > PERM_KLJIM
Definition: Permutations.hpp:139
camp::idx_seq< 0, 4, 2, 1, 3 > PERM_IMKJL
Definition: Permutations.hpp:97
camp::idx_seq< 3, 2, 4, 0, 1 > PERM_LKMIJ
Definition: Permutations.hpp:165
camp::idx_seq< 2, 0, 3, 1, 4 > PERM_KILJM
Definition: Permutations.hpp:127
camp::idx_seq< 0, 1, 2, 4, 3 > PERM_IJKML
Definition: Permutations.hpp:78
camp::idx_seq< 3, 4, 0, 2, 1 > PERM_LMIKJ
Definition: Permutations.hpp:168
camp::idx_seq< 2, 0, 1, 3 > PERM_KIJL
Definition: Permutations.hpp:65
camp::idx_seq< 4, 2, 3, 0, 1 > PERM_MKLIJ
Definition: Permutations.hpp:189
camp::idx_seq< 3, 0, 2, 1 > PERM_LIKJ
Definition: Permutations.hpp:72
camp::idx_seq< 0, 1, 2 > PERM_IJK
Definition: Permutations.hpp:47
camp::idx_seq< 1, 3, 4, 2, 0 > PERM_JLMKI
Definition: Permutations.hpp:118
camp::idx_seq< 1, 3, 0, 2, 4 > PERM_JLIKM
Definition: Permutations.hpp:113
camp::idx_seq< 0, 1, 3, 4, 2 > PERM_IJLMK
Definition: Permutations.hpp:80
camp::idx_seq< 1, 3, 4, 0, 2 > PERM_JLMIK
Definition: Permutations.hpp:117
camp::idx_seq< 4, 1, 0, 3, 2 > PERM_MJILK
Definition: Permutations.hpp:180
camp::idx_seq< 1, 2, 0, 3 > PERM_JKIL
Definition: Permutations.hpp:61
camp::idx_seq< 0, 2, 3, 1 > PERM_IKLJ
Definition: Permutations.hpp:56
camp::idx_seq< 4, 0, 2, 3, 1 > PERM_MIKLJ
Definition: Permutations.hpp:176
camp::idx_seq< 2, 1, 3, 4, 0 > PERM_KJLMI
Definition: Permutations.hpp:134
camp::idx_seq< 0, 2, 1 > PERM_IKJ
Definition: Permutations.hpp:48
camp::idx_seq< 0, 1, 3, 2 > PERM_IJLK
Definition: Permutations.hpp:54
static constexpr std::array< Index_type, sizeof...(Indices)> get()
Definition: Permutations.hpp:38
Definition: Permutations.hpp:33
Definition: Permutations.hpp:204
static constexpr camp::idx_t value
Definition: Permutations.hpp:205
camp::idx_seq< CalcInversePermutationElem< Range, 0, sizeof...(Range), camp::idx_seq< Perm... > >::value... > type
Definition: Permutations.hpp:229
Definition: Permutations.hpp:219