Skip to content

Commit af4650d

Browse files
Replace mpl::apply
Co-authored-by: René Widera <[email protected]>
1 parent f1f9a2d commit af4650d

File tree

88 files changed

+307
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+307
-379
lines changed

include/picongpu/algorithms/ShiftCoordinateSystem.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include <pmacc/meta/ForEach.hpp>
2424
#include <pmacc/types.hpp>
2525

26-
#include <boost/mpl/placeholders.hpp>
27-
2826
namespace picongpu
2927
{
3028
/** shift to new coordinate system

include/picongpu/fields/absorber/exponential/Exponential.kernel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ namespace picongpu
158158

159159
using SimulationDimensions = pmacc::mp_iota<pmacc::mp_int<simDim>>;
160160

161-
meta::ForEach<SimulationDimensions, detail::AbsorbInOneDirection<boost::mpl::_1>>
161+
meta::ForEach<SimulationDimensions, detail::AbsorbInOneDirection<pmacc::_1>>
162162
absorbInAllDirections;
163163

164164
absorbInAllDirections(worker, field, thickness, absorberStrength, mapper, relExchangeDir);

include/picongpu/fields/incidentField/Solver.hpp

Lines changed: 5 additions & 4 deletions
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

Lines changed: 3 additions & 3 deletions
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
@@ -98,7 +99,7 @@ namespace picongpu
9899
* Calculate omega_p for each given species and create a `picLog::PHYSICS`
99100
* log message
100101
*/
101-
template<typename T_Species = boost::mpl::_1>
102+
template<typename T_Species = pmacc::_1>
102103
struct LogOmegaP
103104
{
104105
void operator()()
@@ -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/particles/InitFunctors.hpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
#include "picongpu/particles/manipulators/manipulators.def"
2929

3030
#include <pmacc/Environment.hpp>
31+
#include <pmacc/meta/Apply.hpp>
3132
#include <pmacc/meta/conversion/TypeToPointerPair.hpp>
3233
#include <pmacc/particles/meta/FindByNameOrType.hpp>
3334
#include <pmacc/traits/GetFlagType.hpp>
3435
#include <pmacc/traits/HasFlag.hpp>
3536
#include <pmacc/traits/Resolve.hpp>
3637

37-
#include <boost/mpl/apply.hpp>
3838

3939
namespace picongpu
4040
{
@@ -85,18 +85,18 @@ namespace picongpu
8585
* @tparam T_SpeciesType type or name as PMACC_CSTRING of the used species,
8686
* see speciesDefinition.param
8787
*/
88-
template<typename T_DensityFunctor, typename T_PositionFunctor, typename T_SpeciesType = boost::mpl::_1>
88+
template<typename T_DensityFunctor, typename T_PositionFunctor, typename T_SpeciesType = pmacc::_1>
8989
struct CreateDensity
9090
{
9191
using SpeciesType = pmacc::particles::meta::FindByNameOrType_t<VectorAllSpecies, T_SpeciesType>;
9292
using FrameType = typename SpeciesType::FrameType;
9393

9494

95-
using UserDensityFunctor = typename boost::mpl::apply1<T_DensityFunctor, SpeciesType>::type;
95+
using UserDensityFunctor = pmacc::Apply<T_DensityFunctor, SpeciesType>;
9696
/* add interface for compile time interface validation*/
9797
using DensityFunctor = densityProfiles::IProfile<UserDensityFunctor>;
9898

99-
using UserPositionFunctor = typename boost::mpl::apply1<T_PositionFunctor, SpeciesType>::type;
99+
using UserPositionFunctor = pmacc::Apply<T_PositionFunctor, SpeciesType>;
100100
/* add interface for compile time interface validation*/
101101
using PositionFunctor = manipulators::IUnary<UserPositionFunctor>;
102102

@@ -137,7 +137,7 @@ namespace picongpu
137137
template<
138138
typename T_Manipulator,
139139
typename T_SrcSpeciesType,
140-
typename T_DestSpeciesType = boost::mpl::_1,
140+
typename T_DestSpeciesType = pmacc::_1,
141141
typename T_SrcFilter = filter::All>
142142
struct ManipulateDerive
143143
{
@@ -146,9 +146,9 @@ namespace picongpu
146146
using SrcSpeciesType = pmacc::particles::meta::FindByNameOrType_t<VectorAllSpecies, T_SrcSpeciesType>;
147147
using SrcFrameType = typename SrcSpeciesType::FrameType;
148148

149-
using DestFunctor = typename boost::mpl::apply1<T_Manipulator, DestSpeciesType>::type;
149+
using DestFunctor = pmacc::Apply<T_Manipulator, DestSpeciesType>;
150150

151-
using SrcFilter = typename boost::mpl::apply1<T_SrcFilter, SrcSpeciesType>::type;
151+
using SrcFilter = pmacc::Apply<T_SrcFilter, SrcSpeciesType>;
152152

153153
/* note: this is a FilteredManipulator with filter::All for
154154
* destination species, users can filter the destination directly via if's
@@ -184,10 +184,7 @@ namespace picongpu
184184
* @tparam T_Filter picongpu::particles::filter,
185185
* particle filter type to select source particles to derive
186186
*/
187-
template<
188-
typename T_SrcSpeciesType,
189-
typename T_DestSpeciesType = boost::mpl::_1,
190-
typename T_Filter = filter::All>
187+
template<typename T_SrcSpeciesType, typename T_DestSpeciesType = pmacc::_1, typename T_Filter = filter::All>
191188
struct Derive : ManipulateDerive<manipulators::generic::None, T_SrcSpeciesType, T_DestSpeciesType, T_Filter>
192189
{
193190
};
@@ -208,7 +205,7 @@ namespace picongpu
208205
* @tparam T_SpeciesType type or name as PMACC_CSTRING of the particle species
209206
* to fill gaps in memory
210207
*/
211-
template<typename T_SpeciesType = boost::mpl::_1>
208+
template<typename T_SpeciesType = pmacc::_1>
212209
struct FillAllGaps
213210
{
214211
using SpeciesType = pmacc::particles::meta::FindByNameOrType_t<VectorAllSpecies, T_SpeciesType>;

include/picongpu/particles/Manipulate.hpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
#include <pmacc/particles/algorithm/CallForEach.hpp>
3030
#include <pmacc/particles/meta/FindByNameOrType.hpp>
3131

32-
#include <boost/mpl/placeholders.hpp>
33-
3432
#include <cstdint>
3533
#include <type_traits>
3634

@@ -48,8 +46,8 @@ namespace picongpu
4846
{
4947
private:
5048
using Species = pmacc::particles::meta::FindByNameOrType_t<VectorAllSpecies, T_Species>;
51-
using SpeciesFunctor = typename boost::mpl::apply1<T_Manipulator, Species>::type;
52-
using ParticleFilter = typename boost::mpl::apply1<T_Filter, Species>::type;
49+
using SpeciesFunctor = pmacc::Apply<T_Manipulator, Species>;
50+
using ParticleFilter = pmacc::Apply<T_Filter, Species>;
5351

5452
public:
5553
using type = manipulators::IUnary<SpeciesFunctor, ParticleFilter>;
@@ -76,12 +74,12 @@ namespace picongpu
7674
* @tparam T_Filter picongpu::particles::filter, particle filter type to
7775
* select particles in `T_Species` to manipulate
7876
* @tparam T_Area area to process particles in operator()(currentStep),
79-
* wrapped into std::integral_constant for boost::mpl::apply to work;
77+
* wrapped into std::integral_constant for meta programming to work;
8078
* does not affect operator()(currentStep, areaMapperFactory)
8179
*/
8280
template<
8381
typename T_Manipulator,
84-
typename T_Species = boost::mpl::_1,
82+
typename T_Species = pmacc::_1,
8583
typename T_Filter = filter::All,
8684
typename T_Area = std::integral_constant<uint32_t, CORE + BORDER>>
8785
struct Manipulate
@@ -99,7 +97,7 @@ namespace picongpu
9997
* workflow is as follows:
10098
* - select the species to manipulate, often by filtering VectorAllSpecies
10199
* - define a manipulator type; in case the manipulator has a species type
102-
* as a template parameter, use the boost::mpl::_1 placeholder instead
100+
* as a template parameter, use the pmacc::_1 placeholder instead
103101
* - define a filter type when necessary
104102
* - call manipulate()
105103
*
@@ -135,8 +133,7 @@ namespace picongpu
135133
inline void manipulate(uint32_t const currentStep)
136134
{
137135
using SpeciesSeq = pmacc::ToSeq<T_Species>;
138-
using Functor
139-
= Manipulate<T_Manipulator, boost::mpl::_1, T_Filter, std::integral_constant<uint32_t, T_area>>;
136+
using Functor = Manipulate<T_Manipulator, pmacc::_1, T_Filter, std::integral_constant<uint32_t, T_area>>;
140137
pmacc::meta::ForEach<SpeciesSeq, Functor> forEach;
141138
forEach(currentStep);
142139
}
@@ -156,7 +153,7 @@ namespace picongpu
156153
inline void manipulate(uint32_t const currentStep, T_AreaMapperFactory const& areaMapperFactory)
157154
{
158155
using SpeciesSeq = pmacc::ToSeq<T_Species>;
159-
using Functor = Manipulate<T_Manipulator, boost::mpl::_1, T_Filter>;
156+
using Functor = Manipulate<T_Manipulator, pmacc::_1, T_Filter>;
160157
pmacc::meta::ForEach<SpeciesSeq, Functor> forEach;
161158
forEach(currentStep, areaMapperFactory);
162159
}

include/picongpu/particles/ParticlesFunctors.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ namespace picongpu
213213
/* push all species */
214214
using VectorSpeciesWithPusher =
215215
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, particlePusher<>>::type;
216-
meta::ForEach<VectorSpeciesWithPusher, PushSpecies<boost::mpl::_1>> pushSpecies;
216+
meta::ForEach<VectorSpeciesWithPusher, PushSpecies<pmacc::_1>> pushSpecies;
217217
pushSpecies(currentStep, eventInt, updateEventList);
218218

219219
/* join all push events */
@@ -223,8 +223,7 @@ namespace picongpu
223223
}
224224

225225
/* call communication for all species */
226-
meta::ForEach<VectorSpeciesWithPusher, particles::CommunicateSpecies<boost::mpl::_1>>
227-
communicateSpecies;
226+
meta::ForEach<VectorSpeciesWithPusher, particles::CommunicateSpecies<pmacc::_1>> communicateSpecies;
228227
communicateSpecies(updateEventList, commEventList);
229228

230229
/* join all communication events */
@@ -246,7 +245,7 @@ namespace picongpu
246245
{
247246
using VectorSpeciesWithPusher =
248247
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, particlePusher<>>::type;
249-
meta::ForEach<VectorSpeciesWithPusher, RemoveOuterParticles<boost::mpl::_1>> removeOuterParticles;
248+
meta::ForEach<VectorSpeciesWithPusher, RemoveOuterParticles<pmacc::_1>> removeOuterParticles;
250249
removeOuterParticles(currentStep);
251250
}
252251
};
@@ -326,8 +325,7 @@ namespace picongpu
326325
using hasIonizers = typename HasFlag<FrameType, ionizers<>>::type;
327326
if(hasIonizers::value)
328327
{
329-
meta::ForEach<SelectIonizerList, CallIonizationScheme<SpeciesType, boost::mpl::_1>>
330-
particleIonization;
328+
meta::ForEach<SelectIonizerList, CallIonizationScheme<SpeciesType, pmacc::_1>> particleIonization;
331329
particleIonization(cellDesc, currentStep);
332330
}
333331
}

include/picongpu/particles/ParticlesInit.kernel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ namespace picongpu
205205
using ParticleCleanedAttrList =
206206
typename ResolveAndRemoveFromSeq<ParticleAttrList, AttrToIgnore>::type;
207207

208-
meta::ForEach<ParticleCleanedAttrList, SetAttributeToDefault<boost::mpl::_1>>
209-
setToDefault;
208+
meta::ForEach<ParticleCleanedAttrList, SetAttributeToDefault<pmacc::_1>> setToDefault;
210209
setToDefault(particle);
211210
}
212211
particle[multiMask_] = 1;

include/picongpu/particles/collision/WithPeer.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
#include "picongpu/particles/collision/InterCollision.hpp"
2525
#include "picongpu/particles/collision/IntraCollision.hpp"
2626

27+
#include <pmacc/meta/Apply.hpp>
2728
#include <pmacc/particles/meta/FindByNameOrType.hpp>
2829

29-
#include <boost/mpl/apply.hpp>
30-
3130
#include <cstdio>
3231

3332

@@ -106,8 +105,7 @@ namespace picongpu
106105

107106
using PeerSpecies = pmacc::particles::meta::FindByNameOrType_t<VectorAllSpecies, T_PeerSpecies>;
108107

109-
using CollisionFunctor =
110-
typename boost::mpl::apply2<T_CollisionFunctor, BaseSpecies, PeerSpecies>::type;
108+
using CollisionFunctor = pmacc::Apply<T_CollisionFunctor, BaseSpecies, PeerSpecies>;
111109

112110
detail::WithPeer<CollisionFunctor, T_FilterPair, BaseSpecies, PeerSpecies, colliderId, pairId>{}(
113111
deviceHeap,

include/picongpu/particles/debyeLength/Check.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace picongpu
9797
HINLINE std::uint32_t countElectronLikeSpecies()
9898
{
9999
Counter::value() = 0u;
100-
meta::ForEach<T_SpeciesSeq, ElectonLikeSpeciesCounter<boost::mpl::_1>> count;
100+
meta::ForEach<T_SpeciesSeq, ElectonLikeSpeciesCounter<pmacc::_1>> count;
101101
count();
102102
return Counter::value();
103103
}
@@ -203,7 +203,7 @@ namespace picongpu
203203
}
204204
else
205205
{
206-
meta::ForEach<AllSpeciesWithCurrent, detail::CheckDebyeLength<boost::mpl::_1>> checkDebyeLength;
206+
meta::ForEach<AllSpeciesWithCurrent, detail::CheckDebyeLength<pmacc::_1>> checkDebyeLength;
207207
checkDebyeLength(cellDescription, isPrinting);
208208
}
209209
}

0 commit comments

Comments
 (0)