@@ -166,16 +166,7 @@ LLAMA_FN_HOST_ACC_INLINE void pPInteraction(const Acc& acc, ParticleRefI& pis, P
166
166
template <int ThreadsPerBlock, int SharedElementsPerBlock, int ElementsPerThread, typename QuotedSMMapping>
167
167
struct UpdateKernel
168
168
{
169
- // TODO: make this an IILE in C++20
170
- template <typename Mapping, typename Acc, std::size_t ... Is>
171
- ALPAKA_FN_HOST_ACC auto makeSharedViewHelper (const Acc& acc, std::index_sequence<Is...>) const {
172
- return llama::View{
173
- Mapping{},
174
- llama::Array{alpaka::declareSharedVar<std::byte[Mapping{}.blobSize (Is)], Is>(acc)...}};
175
- }
176
-
177
- template <typename Acc, typename View>
178
- ALPAKA_FN_HOST_ACC void operator ()(const Acc& acc, View particles) const
169
+ ALPAKA_FN_HOST_ACC void operator ()(const auto & acc, auto particles) const
179
170
{
180
171
auto sharedView = [&]
181
172
{
@@ -189,7 +180,12 @@ struct UpdateKernel
189
180
{
190
181
using Mapping = typename QuotedSMMapping::
191
182
template fn<llama::ArrayExtents<int , SharedElementsPerBlock>, SharedMemoryParticle>;
192
- return makeSharedViewHelper<Mapping>(acc, std::make_index_sequence<Mapping::blobCount>{});
183
+ return [&]<std::size_t ... Is>(std::index_sequence<Is...>)
184
+ {
185
+ return llama::View{
186
+ Mapping{},
187
+ llama::Array{alpaka::declareSharedVar<std::byte[Mapping{}.blobSize (Is)], Is>(acc)...}};
188
+ }(std::make_index_sequence<Mapping::blobCount>{});
193
189
}
194
190
}();
195
191
@@ -215,8 +211,7 @@ struct UpdateKernel
215
211
template <int ElementsPerThread>
216
212
struct MoveKernel
217
213
{
218
- template <typename Acc, typename View>
219
- ALPAKA_FN_HOST_ACC void operator ()(const Acc& acc, View particles) const
214
+ ALPAKA_FN_HOST_ACC void operator ()(const auto & acc, auto particles) const
220
215
{
221
216
const auto ti = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0 ];
222
217
const auto i = ti * ElementsPerThread;
0 commit comments