@@ -166,18 +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(bgruber): 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
- {
173
- return llama::View{
174
- Mapping{},
175
- llama::Array<std::byte*, sizeof ...(Is)>{
176
- alpaka::declareSharedVar<std::byte[Mapping{}.blobSize (Is)], Is>(acc)...}};
177
- }
178
-
179
- template <typename Acc, typename View>
180
- 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
181
170
{
182
171
auto sharedView = [&]
183
172
{
@@ -191,7 +180,12 @@ struct UpdateKernel
191
180
{
192
181
using Mapping = typename QuotedSMMapping::
193
182
template fn<llama::ArrayExtents<int , SharedElementsPerBlock>, SharedMemoryParticle>;
194
- 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>{});
195
189
}
196
190
}();
197
191
@@ -217,8 +211,7 @@ struct UpdateKernel
217
211
template <int ElementsPerThread>
218
212
struct MoveKernel
219
213
{
220
- template <typename Acc, typename View>
221
- 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
222
215
{
223
216
const auto ti = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0 ];
224
217
const auto i = ti * ElementsPerThread;
0 commit comments