Skip to content

Commit 8dc2991

Browse files
use PMacc placeholder instead of boost::mpl::_1
1 parent 954c09c commit 8dc2991

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

include/picongpu/fields/incidentField/Solver.hpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#include <pmacc/mappings/kernel/AreaMapping.hpp>
3636
#include <pmacc/math/Vector.hpp>
37+
#include <pmacc/meta/Apply.hpp>
3738
#include <pmacc/meta/ForEach.hpp>
3839
#include <pmacc/meta/conversion/MakeSeq.hpp>
3940
#include <pmacc/traits/IsBaseTemplateOf.hpp>
@@ -633,10 +634,10 @@ namespace picongpu
633634
parameters.direction = 1.0_X;
634635
parameters.sourceTimeIteration = sourceTimeIteration;
635636
parameters.timeIncrement = maxwellSolver::getTimeStep();
636-
meta::ForEach<T_MinProfiles, ApplyUpdateE<boost::mpl::_1>> applyMinProfiles;
637+
meta::ForEach<T_MinProfiles, ApplyUpdateE<pmacc::_1>> applyMinProfiles;
637638
applyMinProfiles(parameters);
638639
parameters.direction = -1.0_X;
639-
meta::ForEach<T_MaxProfiles, ApplyUpdateE<boost::mpl::_1>> applyMaxProfiles;
640+
meta::ForEach<T_MaxProfiles, ApplyUpdateE<pmacc::_1>> applyMaxProfiles;
640641
applyMaxProfiles(parameters);
641642
}
642643

@@ -682,10 +683,10 @@ namespace picongpu
682683
parameters.direction = 1.0_X;
683684
parameters.sourceTimeIteration = sourceTimeIteration;
684685
parameters.timeIncrement = 0.5_X * maxwellSolver::getTimeStep();
685-
meta::ForEach<T_MinProfiles, ApplyUpdateB<boost::mpl::_1>> applyMinProfiles;
686+
meta::ForEach<T_MinProfiles, ApplyUpdateB<pmacc::_1>> applyMinProfiles;
686687
applyMinProfiles(parameters);
687688
parameters.direction = -1.0_X;
688-
meta::ForEach<T_MaxProfiles, ApplyUpdateB<boost::mpl::_1>> applyMaxProfiles;
689+
meta::ForEach<T_MaxProfiles, ApplyUpdateB<pmacc::_1>> applyMaxProfiles;
689690
applyMaxProfiles(parameters);
690691
}
691692

include/picongpu/initialization/InitialiserController.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <pmacc/Environment.hpp>
3636
#include <pmacc/algorithms/math/defines/pi.hpp>
3737
#include <pmacc/assert.hpp>
38+
#include <pmacc/meta/Apply.hpp>
3839
#include <pmacc/pluginSystem/PluginConnector.hpp>
3940

4041
namespace picongpu
@@ -229,8 +230,7 @@ namespace picongpu
229230
{
230231
using namespace fields;
231232
using IncidentFieldProfiles = fields::incidentField::UniqueEnabledProfiles;
232-
meta::ForEach<IncidentFieldProfiles, PrintIncidentFieldDispersion<boost::mpl::_1>>
233-
printIncidentFieldDispersion;
233+
meta::ForEach<IncidentFieldProfiles, PrintIncidentFieldDispersion<pmacc::_1>> printIncidentFieldDispersion;
234234
printIncidentFieldDispersion();
235235
}
236236
};

include/picongpu/plugins/output/images/Visualisation.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include <pmacc/memory/boxes/SharedBox.hpp>
5050
#include <pmacc/memory/buffers/GridBuffer.hpp>
5151
#include <pmacc/memory/shared/Allocate.hpp>
52+
#include <pmacc/meta/Apply.hpp>
5253
#include <pmacc/meta/ForEach.hpp>
5354
#include <pmacc/particles/algorithm/ForEach.hpp>
5455
#include <pmacc/particles/memory/boxes/ParticlesBox.hpp>
@@ -164,7 +165,7 @@ namespace picongpu
164165
HDINLINE static float_X getAmplitude()
165166
{
166167
using Profiles = fields::incidentField::UniqueEnabledProfiles;
167-
meta::ForEach<Profiles, CalculateMaxAmplitude<boost::mpl::_1>> calculateMaxAmplitude;
168+
meta::ForEach<Profiles, CalculateMaxAmplitude<pmacc::_1>> calculateMaxAmplitude;
168169
auto maxAmplitude = 0.0_X;
169170
calculateMaxAmplitude(maxAmplitude);
170171
return maxAmplitude;

include/picongpu/simulation/stage/AtomicPhysics.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
// actual call to kernel found here
2626
#include <pmacc/Environment.hpp>
2727
#include <pmacc/dataManagement/DataConnector.hpp>
28+
#include <pmacc/meta/Apply.hpp>
2829

2930
#include <cstdint>
3031

@@ -81,9 +82,8 @@ namespace picongpu
8182
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, atomicPhysicsSolver<>>::type;
8283

8384
//! kernel to be called for each species
84-
pmacc::meta::
85-
ForEach<SpeciesWithAtomicPhysics, particles::atomicPhysics::CallAtomicPhysics<boost::mpl::_1>>
86-
callAtomicPhysics;
85+
pmacc::meta::ForEach<SpeciesWithAtomicPhysics, particles::atomicPhysics::CallAtomicPhysics<pmacc::_1>>
86+
callAtomicPhysics;
8787

8888
/** Description of cell structure used for PIC-Simulations.
8989
*

include/pmacc/meta/Apply.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ namespace pmacc
4242
struct ReplacePlaceholdersImpl<E<Ts...>, Args...>
4343
{
4444
using type = E<typename ReplacePlaceholdersImpl<Ts, Args...>::type...>;
45-
// using type = typename E<typename ReplacePlaceholdersImpl<Ts, Args...>::type...>::type; // also calls
4645
// nested ::type of E to mimic mpl::apply
46+
// using type = typename E<typename ReplacePlaceholdersImpl<Ts, Args...>::type...>::type;
4747
};
4848
} // namespace detail
4949

include/pmacc/meta/ForEach.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
namespace pmacc::meta
3030
{
31-
/** Compile-Time for each for type lists
31+
/** Compile-Time for each for type lists
3232
*
3333
* @tparam List An mp_list.
3434
* @tparam T_Functor An unary lambda functor with a HDINLINE void operator()(...) method
35-
* _1 is substituted by Accessor's result using Apply with elements from List.
35+
* _1 is substituted by Accessor's result using Apply with elements from List.
3636
* @tparam T_Accessor An unary lambda operation
3737
*
3838
* Example:
@@ -47,10 +47,10 @@ namespace pmacc::meta
4747
template<typename List, typename T_Functor, typename T_Accessor = mp_identity<_1>>
4848
struct ForEach
4949
{
50-
template<typename T>
51-
using MakeFunctor = Apply<T_Functor, typename Apply<T_Accessor, T>::type>;
50+
template<typename T>
51+
using MakeFunctor = Apply<T_Functor, typename Apply<T_Accessor, T>::type>;
5252

53-
using SolvedFunctors = mp_transform<MakeFunctor, List>;
53+
using SolvedFunctors = mp_transform<MakeFunctor, List>;
5454

5555
template<typename... T_Types>
5656
HDINLINE void operator()(T_Types&&... ts) const

0 commit comments

Comments
 (0)