Skip to content

Commit d80b439

Browse files
bernhardmgruberpsychocoderHPC
authored andcommitted
replace use of mpl by mp11
1 parent fa107fe commit d80b439

File tree

188 files changed

+738
-1238
lines changed

Some content is hidden

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

188 files changed

+738
-1238
lines changed

docs/source/models/binary_collisions.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ To enable collisions between the Ions and Electrons with a constant coulomb loga
6868
*
6969
* the functors are called in order (from first to last functor)
7070
*/
71-
using CollisionPipeline = bmpl::
72-
vector<Collider<relativistic::RelativisticCollisionConstLog<Params>, Pairs> >;
71+
using CollisionPipeline = boost::mp11::
72+
mp_list<Collider<relativistic::RelativisticCollisionConstLog<Params>, Pairs> >;
7373
} // namespace collision
7474
} // namespace particles
7575
} // namespace picongpu
@@ -100,7 +100,7 @@ Here is an example with :math:`\Lambda = 5` for electron-ion collisions and :mat
100100
using Pairs1 = MakeSeq_t<Pair<Electrons, Ions>>;
101101
using Pairs2 = MakeSeq_t<Pair<Electrons, Electrons>, Pair<Ions, Ions>>;
102102
using CollisionPipeline =
103-
bmpl::vector<
103+
boost::mp11::mp_list<
104104
Collider<relativistic::RelativisticCollisionConstLog<Params1>, Pairs1>,
105105
Collider<relativistic::RelativisticCollisionConstLog<Params2>, Pairs2>
106106
>;
@@ -112,7 +112,7 @@ For example the previous setup with automatic calculation for the inter-species
112112
.. code:: c++
113113

114114
using CollisionPipeline =
115-
bmpl::vector<
115+
boost::mp11::mp_list<
116116
Collider<relativistic::RelativisticCollisionDynamicLog<>, Pairs1>,
117117
Collider<relativistic::RelativisticCollisionConstLog<Params2>, Pairs2>
118118
>;
@@ -137,7 +137,7 @@ You need to define your filters in ``particleFilters.param`` and than you can us
137137
using Pairs1 = MakeSeq_t<Pair<Electrons, Ions>>;
138138
using Pairs2 = MakeSeq_t<Pair<Electrons, Electrons>, Pair<Ions, Ions>>;
139139
using CollisionPipeline =
140-
bmpl::vector<
140+
boost::mp11::mp_list<
141141
Collider<
142142
relativistic::RelativisticCollisionConstLog<Params1>,
143143
Pairs1,
@@ -190,7 +190,7 @@ This debug output can be enabled per collider by setting the optional template p
190190
.. code:: c++
191191

192192
using CollisionPipeline =
193-
bmpl::vector<
193+
boost::mp11::mp_list<
194194
Collider<relativistic::RelativisticCollisionDynamicLog<true>, Pairs1>,
195195
Collider<relativistic::RelativisticCollisionConstLog<Params2, true>, Pairs2>
196196
>;

docs/source/pypicongpu/species.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ The operations result in this ``speciesInitialization.param``:
744744

745745
.. code:: c++
746746

747-
using InitPipeline = bmpl::vector<
747+
using InitPipeline = boost::mp11::mp_list<
748748
/**********************************/
749749
/* phase 1: create macroparticles */
750750
/**********************************/

docs/source/usage/workflows/probeParticles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ and add it to ``VectorAllSpecies``:
8484

8585
.. code-block:: cpp
8686
87-
using InitPipeline = bmpl::vector<
87+
using InitPipeline = pmacc::mp_list<
8888
// ... ,
8989
CreateDensity<
9090
densityProfiles::ProbeEveryFourthCell,

docs/source/usage/workflows/quasiNeutrality.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For fully ionized ions, just use ``ManipulateDerive`` in :ref:`speciesInitializa
1515

1616
.. code-block:: cpp
1717
18-
using InitPipeline = bmpl::vector<
18+
using InitPipeline = pmacc::mp_list<
1919
/* density profile from density.param and
2020
* start position from particle.param */
2121
CreateDensity<
@@ -72,7 +72,7 @@ Then again in :ref:`speciesInitialization.param <usage-params-core>` set your in
7272

7373
.. code-block:: cpp
7474
75-
using InitPipeline = bmpl::vector<
75+
using InitPipeline = pmacc::mp_list<
7676
/* density profile from density.param and
7777
* start position from particle.param */
7878
CreateDensity<

include/picongpu/algorithms/ShiftCoordinateSystem.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@
2020

2121
#pragma once
2222

23-
#include <pmacc/math/vector/Int.hpp>
24-
#include <pmacc/meta/AllCombinations.hpp>
2523
#include <pmacc/meta/ForEach.hpp>
2624
#include <pmacc/types.hpp>
2725

28-
#include <boost/mpl/range_c.hpp>
29-
#include <boost/mpl/vector.hpp>
26+
#include <boost/mpl/placeholders.hpp>
3027

3128
namespace picongpu
3229
{

include/picongpu/fields/EMFieldBase.tpp

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,25 @@
3737
#include <pmacc/particles/traits/FilterByFlag.hpp>
3838
#include <pmacc/traits/GetUniqueTypeId.hpp>
3939

40-
#include <boost/mpl/accumulate.hpp>
41-
4240
#include <cstdint>
4341
#include <memory>
4442
#include <type_traits>
4543

46-
4744
namespace picongpu
4845
{
4946
namespace fields
5047
{
48+
template<typename A, typename B>
49+
using LowerMarginInterpolationOp =
50+
typename pmacc::math::CT::max<A, typename GetLowerMargin<typename GetInterpolation<B>::type>::type>::type;
51+
template<typename A, typename B>
52+
using UpperMarginInterpolationOp =
53+
typename pmacc::math::CT::max<A, typename GetUpperMargin<typename GetInterpolation<B>::type>::type>::type;
54+
template<typename A, typename B>
55+
using LowerMarginOp = typename pmacc::math::CT::max<A, typename GetLowerMarginPusher<B>::type>::type;
56+
template<typename A, typename B>
57+
using UpperMarginOp = typename pmacc::math::CT::max<A, typename GetUpperMarginPusher<B>::type>::type;
58+
5159
template<typename T_DerivedField>
5260
EMFieldBase<T_DerivedField>::EMFieldBase(MappingDesc const& cellDescription, pmacc::SimulationDataId const& id)
5361
: SimulationFieldHelper<MappingDesc>(cellDescription)
@@ -57,14 +65,15 @@ namespace picongpu
5765

5866
using VectorSpeciesWithInterpolation =
5967
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, interpolation<>>::type;
60-
using LowerMarginInterpolation = bmpl::accumulate<
68+
69+
using LowerMarginInterpolation = pmacc::mp_fold<
6170
VectorSpeciesWithInterpolation,
6271
typename pmacc::math::CT::make_Int<simDim, 0>::type,
63-
pmacc::math::CT::max<bmpl::_1, GetLowerMargin<GetInterpolation<bmpl::_2>>>>::type;
64-
using UpperMarginInterpolation = bmpl::accumulate<
72+
LowerMarginInterpolationOp>;
73+
using UpperMarginInterpolation = pmacc::mp_fold<
6574
VectorSpeciesWithInterpolation,
6675
typename pmacc::math::CT::make_Int<simDim, 0>::type,
67-
pmacc::math::CT::max<bmpl::_1, GetUpperMargin<GetInterpolation<bmpl::_2>>>>::type;
76+
UpperMarginInterpolationOp>;
6877

6978
/* Calculate the maximum Neighbors we need from MAX(ParticleShape, FieldSolver) */
7079
using LowerMarginSolver = typename traits::GetLowerMargin<fields::Solver, DerivedField>::type;
@@ -80,15 +89,11 @@ namespace picongpu
8089
*/
8190
using VectorSpeciesWithPusherAndInterpolation = typename pmacc::particles::traits::
8291
FilterByFlag<VectorSpeciesWithInterpolation, particlePusher<>>::type;
83-
using LowerMargin = typename bmpl::accumulate<
84-
VectorSpeciesWithPusherAndInterpolation,
85-
LowerMarginInterpolationAndSolver,
86-
pmacc::math::CT::max<bmpl::_1, GetLowerMarginPusher<bmpl::_2>>>::type;
87-
88-
using UpperMargin = typename bmpl::accumulate<
89-
VectorSpeciesWithPusherAndInterpolation,
90-
UpperMarginInterpolationAndSolver,
91-
pmacc::math::CT::max<bmpl::_1, GetUpperMarginPusher<bmpl::_2>>>::type;
92+
93+
using LowerMargin = pmacc::
94+
mp_fold<VectorSpeciesWithPusherAndInterpolation, LowerMarginInterpolationAndSolver, LowerMarginOp>;
95+
using UpperMargin = pmacc::
96+
mp_fold<VectorSpeciesWithPusherAndInterpolation, UpperMarginInterpolationAndSolver, UpperMarginOp>;
9297

9398
const DataSpace<simDim> originGuard(LowerMargin().toRT());
9499
const DataSpace<simDim> endGuard(UpperMargin().toRT());

include/picongpu/fields/FieldJ.tpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#include <pmacc/traits/GetUniqueTypeId.hpp>
4040
#include <pmacc/traits/Resolve.hpp>
4141

42-
#include <boost/mpl/accumulate.hpp>
43-
4442
#include <algorithm>
4543
#include <cstdint>
4644
#include <iostream>
@@ -52,6 +50,13 @@ namespace picongpu
5250
{
5351
using namespace pmacc;
5452

53+
template<typename A, typename B>
54+
using LowerMarginShapesOp =
55+
typename pmacc::math::CT::max<A, typename GetLowerMargin<typename GetCurrentSolver<B>::type>::type>::type;
56+
template<typename A, typename B>
57+
using UpperMarginShapesOp =
58+
typename pmacc::math::CT::max<A, typename GetUpperMargin<typename GetCurrentSolver<B>::type>::type>::type;
59+
5560
FieldJ::FieldJ(MappingDesc const& cellDescription)
5661
: SimulationFieldHelper<MappingDesc>(cellDescription)
5762
, buffer(cellDescription.getGridLayout())
@@ -63,15 +68,10 @@ namespace picongpu
6368
using AllSpeciesWithCurrent =
6469
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, current<>>::type;
6570

66-
using LowerMarginShapes = bmpl::accumulate<
67-
AllSpeciesWithCurrent,
68-
typename pmacc::math::CT::make_Int<simDim, 0>::type,
69-
pmacc::math::CT::max<bmpl::_1, GetLowerMargin<GetCurrentSolver<bmpl::_2>>>>::type;
70-
71-
using UpperMarginShapes = bmpl::accumulate<
72-
AllSpeciesWithCurrent,
73-
typename pmacc::math::CT::make_Int<simDim, 0>::type,
74-
pmacc::math::CT::max<bmpl::_1, GetUpperMargin<GetCurrentSolver<bmpl::_2>>>>::type;
71+
using LowerMarginShapes = pmacc::
72+
mp_fold<AllSpeciesWithCurrent, typename pmacc::math::CT::make_Int<simDim, 0>::type, LowerMarginShapesOp>;
73+
using UpperMarginShapes = pmacc::
74+
mp_fold<AllSpeciesWithCurrent, typename pmacc::math::CT::make_Int<simDim, 0>::type, UpperMarginShapesOp>;
7575

7676
/* margins are always positive, also for lower margins
7777
* additional current interpolations and current filters on FieldJ might

include/picongpu/fields/FieldTmp.tpp

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,25 @@
3939
#include <pmacc/particles/traits/FilterByFlag.hpp>
4040
#include <pmacc/traits/GetUniqueTypeId.hpp>
4141

42-
#include <boost/mpl/accumulate.hpp>
43-
4442
#include <memory>
4543
#include <string>
4644

47-
4845
namespace picongpu
4946
{
5047
using namespace pmacc;
5148

49+
template<typename A, typename B>
50+
using SpeciesLowerMarginOp =
51+
typename pmacc::math::CT::max<A, typename GetLowerMargin<typename GetInterpolation<B>::type>::type>::type;
52+
template<typename A, typename B>
53+
using SpeciesUpperMarginOp =
54+
typename pmacc::math::CT::max<A, typename GetUpperMargin<typename GetInterpolation<B>::type>::type>::type;
55+
56+
template<typename A, typename B>
57+
using FieldTmpLowerMarginOp = typename pmacc::math::CT::max<A, typename GetLowerMargin<B>::type>::type;
58+
template<typename A, typename B>
59+
using FieldTmpUpperMarginOp = typename pmacc::math::CT::max<A, typename GetUpperMargin<B>::type>::type;
60+
5261
FieldTmp::FieldTmp(MappingDesc const& cellDescription, uint32_t slotId)
5362
: SimulationFieldHelper<MappingDesc>(cellDescription)
5463
, m_slotId(slotId)
@@ -79,15 +88,13 @@ namespace picongpu
7988
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, interpolation<>>::type;
8089

8190
/* ------------------ lower margin ----------------------------------*/
82-
using SpeciesLowerMargin = bmpl::accumulate<
91+
using SpeciesLowerMargin = pmacc::mp_fold<
8392
VectorSpeciesWithInterpolation,
8493
typename pmacc::math::CT::make_Int<simDim, 0>::type,
85-
pmacc::math::CT::max<bmpl::_1, GetLowerMargin<GetInterpolation<bmpl::_2>>>>::type;
94+
SpeciesLowerMarginOp>;
8695

87-
using FieldTmpLowerMargin = bmpl::accumulate<
88-
FieldTmpSolvers,
89-
typename pmacc::math::CT::make_Int<simDim, 0>::type,
90-
pmacc::math::CT::max<bmpl::_1, GetLowerMargin<bmpl::_2>>>::type;
96+
using FieldTmpLowerMargin = pmacc::
97+
mp_fold<FieldTmpSolvers, typename pmacc::math::CT::make_Int<simDim, 0>::type, FieldTmpLowerMarginOp>;
9198

9299
using SpeciesFieldTmpLowerMargin = pmacc::math::CT::max<SpeciesLowerMargin, FieldTmpLowerMargin>::type;
93100

@@ -98,15 +105,13 @@ namespace picongpu
98105

99106
/* ------------------ upper margin -----------------------------------*/
100107

101-
using SpeciesUpperMargin = bmpl::accumulate<
108+
using SpeciesUpperMargin = pmacc::mp_fold<
102109
VectorSpeciesWithInterpolation,
103110
typename pmacc::math::CT::make_Int<simDim, 0>::type,
104-
pmacc::math::CT::max<bmpl::_1, GetUpperMargin<GetInterpolation<bmpl::_2>>>>::type;
111+
SpeciesUpperMarginOp>;
105112

106-
using FieldTmpUpperMargin = bmpl::accumulate<
107-
FieldTmpSolvers,
108-
typename pmacc::math::CT::make_Int<simDim, 0>::type,
109-
pmacc::math::CT::max<bmpl::_1, GetUpperMargin<bmpl::_2>>>::type;
113+
using FieldTmpUpperMargin = pmacc::
114+
mp_fold<FieldTmpSolvers, typename pmacc::math::CT::make_Int<simDim, 0>::type, FieldTmpUpperMarginOp>;
110115

111116
using SpeciesFieldTmpUpperMargin = pmacc::math::CT::max<SpeciesUpperMargin, FieldTmpUpperMargin>::type;
112117

include/picongpu/fields/LaserPhysics.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ namespace picongpu
170170

171171
using LaserPlaneSizeInSuperCells = typename pmacc::math::CT::AssignIfInRange<
172172
typename SuperCellSize::vector_type,
173-
bmpl::integral_c<uint32_t, 1>, /* y direction */
174-
bmpl::integral_c<int, laserInitCellsInY>>::type;
173+
std::integral_constant<uint32_t, 1>, /* y direction */
174+
std::integral_constant<int, laserInitCellsInY>>::type;
175175

176176
DataSpace<simDim> gridBlocks
177177
= Environment<simDim>::get().SubGrid().getLocalDomain().size / SuperCellSize::toRT();

include/picongpu/fields/MaxwellSolver/Substepping/Substepping.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ namespace picongpu
261261
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, current<>>::type;
262262
//! Whether the simulation has any current sources
263263
static constexpr auto existsCurrent
264-
= (bmpl::size<SpeciesWithCurrentSolver>::type::value > 0) || FieldBackgroundJ::activated;
264+
= (pmacc::mp_size<SpeciesWithCurrentSolver>::value > 0) || FieldBackgroundJ::activated;
265265

266266
/** Whether previousJ is initialized with data of J from previous time step
267267
*

0 commit comments

Comments
 (0)