diff --git a/include/picongpu/algorithms/ShiftCoordinateSystem.hpp b/include/picongpu/algorithms/ShiftCoordinateSystem.hpp index b7e754b1ad..06d1aeb10b 100644 --- a/include/picongpu/algorithms/ShiftCoordinateSystem.hpp +++ b/include/picongpu/algorithms/ShiftCoordinateSystem.hpp @@ -23,8 +23,6 @@ #include #include -#include - namespace picongpu { /** shift to new coordinate system diff --git a/include/picongpu/fields/absorber/exponential/Exponential.kernel b/include/picongpu/fields/absorber/exponential/Exponential.kernel index 3552ce25b7..cb60ea2c9b 100644 --- a/include/picongpu/fields/absorber/exponential/Exponential.kernel +++ b/include/picongpu/fields/absorber/exponential/Exponential.kernel @@ -158,7 +158,7 @@ namespace picongpu using SimulationDimensions = pmacc::mp_iota>; - meta::ForEach> + meta::ForEach> absorbInAllDirections; absorbInAllDirections(worker, field, thickness, absorberStrength, mapper, relExchangeDir); diff --git a/include/picongpu/fields/incidentField/Solver.hpp b/include/picongpu/fields/incidentField/Solver.hpp index 4c6cb1b484..8240145d86 100644 --- a/include/picongpu/fields/incidentField/Solver.hpp +++ b/include/picongpu/fields/incidentField/Solver.hpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -633,10 +634,10 @@ namespace picongpu parameters.direction = 1.0_X; parameters.sourceTimeIteration = sourceTimeIteration; parameters.timeIncrement = maxwellSolver::getTimeStep(); - meta::ForEach> applyMinProfiles; + meta::ForEach> applyMinProfiles; applyMinProfiles(parameters); parameters.direction = -1.0_X; - meta::ForEach> applyMaxProfiles; + meta::ForEach> applyMaxProfiles; applyMaxProfiles(parameters); } @@ -682,10 +683,10 @@ namespace picongpu parameters.direction = 1.0_X; parameters.sourceTimeIteration = sourceTimeIteration; parameters.timeIncrement = 0.5_X * maxwellSolver::getTimeStep(); - meta::ForEach> applyMinProfiles; + meta::ForEach> applyMinProfiles; applyMinProfiles(parameters); parameters.direction = -1.0_X; - meta::ForEach> applyMaxProfiles; + meta::ForEach> applyMaxProfiles; applyMaxProfiles(parameters); } diff --git a/include/picongpu/initialization/InitialiserController.hpp b/include/picongpu/initialization/InitialiserController.hpp index 706aae5232..177cc2f329 100644 --- a/include/picongpu/initialization/InitialiserController.hpp +++ b/include/picongpu/initialization/InitialiserController.hpp @@ -35,6 +35,7 @@ #include #include #include +#include #include namespace picongpu @@ -98,7 +99,7 @@ namespace picongpu * Calculate omega_p for each given species and create a `picLog::PHYSICS` * log message */ - template + template struct LogOmegaP { void operator()() @@ -229,8 +230,7 @@ namespace picongpu { using namespace fields; using IncidentFieldProfiles = fields::incidentField::UniqueEnabledProfiles; - meta::ForEach> - printIncidentFieldDispersion; + meta::ForEach> printIncidentFieldDispersion; printIncidentFieldDispersion(); } }; diff --git a/include/picongpu/particles/InitFunctors.hpp b/include/picongpu/particles/InitFunctors.hpp index b27201003d..86256f96d4 100644 --- a/include/picongpu/particles/InitFunctors.hpp +++ b/include/picongpu/particles/InitFunctors.hpp @@ -28,13 +28,13 @@ #include "picongpu/particles/manipulators/manipulators.def" #include +#include #include #include #include #include #include -#include namespace picongpu { @@ -85,18 +85,18 @@ namespace picongpu * @tparam T_SpeciesType type or name as PMACC_CSTRING of the used species, * see speciesDefinition.param */ - template + template struct CreateDensity { using SpeciesType = pmacc::particles::meta::FindByNameOrType_t; using FrameType = typename SpeciesType::FrameType; - using UserDensityFunctor = typename boost::mpl::apply1::type; + using UserDensityFunctor = pmacc::Apply; /* add interface for compile time interface validation*/ using DensityFunctor = densityProfiles::IProfile; - using UserPositionFunctor = typename boost::mpl::apply1::type; + using UserPositionFunctor = pmacc::Apply; /* add interface for compile time interface validation*/ using PositionFunctor = manipulators::IUnary; @@ -137,7 +137,7 @@ namespace picongpu template< typename T_Manipulator, typename T_SrcSpeciesType, - typename T_DestSpeciesType = boost::mpl::_1, + typename T_DestSpeciesType = pmacc::_1, typename T_SrcFilter = filter::All> struct ManipulateDerive { @@ -146,9 +146,9 @@ namespace picongpu using SrcSpeciesType = pmacc::particles::meta::FindByNameOrType_t; using SrcFrameType = typename SrcSpeciesType::FrameType; - using DestFunctor = typename boost::mpl::apply1::type; + using DestFunctor = pmacc::Apply; - using SrcFilter = typename boost::mpl::apply1::type; + using SrcFilter = pmacc::Apply; /* note: this is a FilteredManipulator with filter::All for * destination species, users can filter the destination directly via if's @@ -184,10 +184,7 @@ namespace picongpu * @tparam T_Filter picongpu::particles::filter, * particle filter type to select source particles to derive */ - template< - typename T_SrcSpeciesType, - typename T_DestSpeciesType = boost::mpl::_1, - typename T_Filter = filter::All> + template struct Derive : ManipulateDerive { }; @@ -208,7 +205,7 @@ namespace picongpu * @tparam T_SpeciesType type or name as PMACC_CSTRING of the particle species * to fill gaps in memory */ - template + template struct FillAllGaps { using SpeciesType = pmacc::particles::meta::FindByNameOrType_t; diff --git a/include/picongpu/particles/Manipulate.hpp b/include/picongpu/particles/Manipulate.hpp index ea5ebf1371..887a365656 100644 --- a/include/picongpu/particles/Manipulate.hpp +++ b/include/picongpu/particles/Manipulate.hpp @@ -29,8 +29,6 @@ #include #include -#include - #include #include @@ -48,8 +46,8 @@ namespace picongpu { private: using Species = pmacc::particles::meta::FindByNameOrType_t; - using SpeciesFunctor = typename boost::mpl::apply1::type; - using ParticleFilter = typename boost::mpl::apply1::type; + using SpeciesFunctor = pmacc::Apply; + using ParticleFilter = pmacc::Apply; public: using type = manipulators::IUnary; @@ -76,12 +74,12 @@ namespace picongpu * @tparam T_Filter picongpu::particles::filter, particle filter type to * select particles in `T_Species` to manipulate * @tparam T_Area area to process particles in operator()(currentStep), - * wrapped into std::integral_constant for boost::mpl::apply to work; + * wrapped into std::integral_constant for meta programming to work; * does not affect operator()(currentStep, areaMapperFactory) */ template< typename T_Manipulator, - typename T_Species = boost::mpl::_1, + typename T_Species = pmacc::_1, typename T_Filter = filter::All, typename T_Area = std::integral_constant> struct Manipulate @@ -99,7 +97,7 @@ namespace picongpu * workflow is as follows: * - select the species to manipulate, often by filtering VectorAllSpecies * - define a manipulator type; in case the manipulator has a species type - * as a template parameter, use the boost::mpl::_1 placeholder instead + * as a template parameter, use the pmacc::_1 placeholder instead * - define a filter type when necessary * - call manipulate() * @@ -135,8 +133,7 @@ namespace picongpu inline void manipulate(uint32_t const currentStep) { using SpeciesSeq = pmacc::ToSeq; - using Functor - = Manipulate>; + using Functor = Manipulate>; pmacc::meta::ForEach forEach; forEach(currentStep); } @@ -156,7 +153,7 @@ namespace picongpu inline void manipulate(uint32_t const currentStep, T_AreaMapperFactory const& areaMapperFactory) { using SpeciesSeq = pmacc::ToSeq; - using Functor = Manipulate; + using Functor = Manipulate; pmacc::meta::ForEach forEach; forEach(currentStep, areaMapperFactory); } diff --git a/include/picongpu/particles/ParticlesFunctors.hpp b/include/picongpu/particles/ParticlesFunctors.hpp index 2ee63ffa2c..7a3e064bfd 100644 --- a/include/picongpu/particles/ParticlesFunctors.hpp +++ b/include/picongpu/particles/ParticlesFunctors.hpp @@ -213,7 +213,7 @@ namespace picongpu /* push all species */ using VectorSpeciesWithPusher = typename pmacc::particles::traits::FilterByFlag>::type; - meta::ForEach> pushSpecies; + meta::ForEach> pushSpecies; pushSpecies(currentStep, eventInt, updateEventList); /* join all push events */ @@ -223,8 +223,7 @@ namespace picongpu } /* call communication for all species */ - meta::ForEach> - communicateSpecies; + meta::ForEach> communicateSpecies; communicateSpecies(updateEventList, commEventList); /* join all communication events */ @@ -246,7 +245,7 @@ namespace picongpu { using VectorSpeciesWithPusher = typename pmacc::particles::traits::FilterByFlag>::type; - meta::ForEach> removeOuterParticles; + meta::ForEach> removeOuterParticles; removeOuterParticles(currentStep); } }; @@ -326,8 +325,7 @@ namespace picongpu using hasIonizers = typename HasFlag>::type; if(hasIonizers::value) { - meta::ForEach> - particleIonization; + meta::ForEach> particleIonization; particleIonization(cellDesc, currentStep); } } diff --git a/include/picongpu/particles/ParticlesInit.kernel b/include/picongpu/particles/ParticlesInit.kernel index 4308b80f6a..cb2cb34336 100644 --- a/include/picongpu/particles/ParticlesInit.kernel +++ b/include/picongpu/particles/ParticlesInit.kernel @@ -205,8 +205,7 @@ namespace picongpu using ParticleCleanedAttrList = typename ResolveAndRemoveFromSeq::type; - meta::ForEach> - setToDefault; + meta::ForEach> setToDefault; setToDefault(particle); } particle[multiMask_] = 1; diff --git a/include/picongpu/particles/collision/WithPeer.hpp b/include/picongpu/particles/collision/WithPeer.hpp index 5ef70218b6..a98759f937 100644 --- a/include/picongpu/particles/collision/WithPeer.hpp +++ b/include/picongpu/particles/collision/WithPeer.hpp @@ -24,10 +24,9 @@ #include "picongpu/particles/collision/InterCollision.hpp" #include "picongpu/particles/collision/IntraCollision.hpp" +#include #include -#include - #include @@ -106,8 +105,7 @@ namespace picongpu using PeerSpecies = pmacc::particles::meta::FindByNameOrType_t; - using CollisionFunctor = - typename boost::mpl::apply2::type; + using CollisionFunctor = pmacc::Apply; detail::WithPeer{}( deviceHeap, diff --git a/include/picongpu/particles/debyeLength/Check.hpp b/include/picongpu/particles/debyeLength/Check.hpp index c925201e68..2edd984697 100644 --- a/include/picongpu/particles/debyeLength/Check.hpp +++ b/include/picongpu/particles/debyeLength/Check.hpp @@ -97,7 +97,7 @@ namespace picongpu HINLINE std::uint32_t countElectronLikeSpecies() { Counter::value() = 0u; - meta::ForEach> count; + meta::ForEach> count; count(); return Counter::value(); } @@ -203,7 +203,7 @@ namespace picongpu } else { - meta::ForEach> checkDebyeLength; + meta::ForEach> checkDebyeLength; checkDebyeLength(cellDescription, isPrinting); } } diff --git a/include/picongpu/particles/densityProfiles/EveryNthCellImpl.hpp b/include/picongpu/particles/densityProfiles/EveryNthCellImpl.hpp index 6372b6d41c..42a3341e67 100644 --- a/include/picongpu/particles/densityProfiles/EveryNthCellImpl.hpp +++ b/include/picongpu/particles/densityProfiles/EveryNthCellImpl.hpp @@ -37,10 +37,7 @@ namespace picongpu using SkipCells = typename pmacc::math::CT::shrinkTo::type; template - struct apply - { - using type = EveryNthCellImpl; - }; + using fn = EveryNthCellImpl; HINLINE EveryNthCellImpl(uint32_t currentStep) diff --git a/include/picongpu/particles/densityProfiles/FreeFormulaImpl.hpp b/include/picongpu/particles/densityProfiles/FreeFormulaImpl.hpp index 334b979602..f3a7a860b4 100644 --- a/include/picongpu/particles/densityProfiles/FreeFormulaImpl.hpp +++ b/include/picongpu/particles/densityProfiles/FreeFormulaImpl.hpp @@ -35,10 +35,7 @@ namespace picongpu using UserFunctor = particles::functor::User; template - struct apply - { - using type = FreeFormulaImpl; - }; + using fn = FreeFormulaImpl; HINLINE FreeFormulaImpl(uint32_t currentStep) : UserFunctor(currentStep) { diff --git a/include/picongpu/particles/densityProfiles/FromOpenPMDImpl.hpp b/include/picongpu/particles/densityProfiles/FromOpenPMDImpl.hpp index e8f666d9cb..d1be1cb8c7 100644 --- a/include/picongpu/particles/densityProfiles/FromOpenPMDImpl.hpp +++ b/include/picongpu/particles/densityProfiles/FromOpenPMDImpl.hpp @@ -305,14 +305,13 @@ namespace picongpu } // namespace detail /** Wrapper to be used in density.param, compatible with other density definitions - * - * Hooks internal implementation in detail:: to boost::mpl::apply * * @tparam T_ParamClass parameter type */ template struct FromOpenPMDImpl : public T_ParamClass { + // TODO(bgruber): is this supposed to hook into MPL? I cannot find where this is used. template struct apply { diff --git a/include/picongpu/particles/densityProfiles/GaussianCloudImpl.hpp b/include/picongpu/particles/densityProfiles/GaussianCloudImpl.hpp index 05e051e5f5..29d08759de 100644 --- a/include/picongpu/particles/densityProfiles/GaussianCloudImpl.hpp +++ b/include/picongpu/particles/densityProfiles/GaussianCloudImpl.hpp @@ -34,10 +34,7 @@ namespace picongpu using ParamClass = T_ParamClass; template - struct apply - { - using type = GaussianCloudImpl; - }; + using fn = GaussianCloudImpl; HINLINE GaussianCloudImpl(uint32_t currentStep) { diff --git a/include/picongpu/particles/densityProfiles/GaussianImpl.hpp b/include/picongpu/particles/densityProfiles/GaussianImpl.hpp index 4252e55030..bb8763af31 100644 --- a/include/picongpu/particles/densityProfiles/GaussianImpl.hpp +++ b/include/picongpu/particles/densityProfiles/GaussianImpl.hpp @@ -34,10 +34,7 @@ namespace picongpu using ParamClass = T_ParamClass; template - struct apply - { - using type = GaussianImpl; - }; + using fn = GaussianImpl; HINLINE GaussianImpl(uint32_t currentStep) { diff --git a/include/picongpu/particles/densityProfiles/HomogenousImpl.hpp b/include/picongpu/particles/densityProfiles/HomogenousImpl.hpp index 2c0eef51d5..e03b0f13ac 100644 --- a/include/picongpu/particles/densityProfiles/HomogenousImpl.hpp +++ b/include/picongpu/particles/densityProfiles/HomogenousImpl.hpp @@ -29,10 +29,7 @@ namespace picongpu struct HomogenousImpl { template - struct apply - { - using type = HomogenousImpl; - }; + using fn = HomogenousImpl; HINLINE HomogenousImpl(uint32_t currentStep) { diff --git a/include/picongpu/particles/densityProfiles/LinearExponentialImpl.hpp b/include/picongpu/particles/densityProfiles/LinearExponentialImpl.hpp index 4f637c400a..d044582190 100644 --- a/include/picongpu/particles/densityProfiles/LinearExponentialImpl.hpp +++ b/include/picongpu/particles/densityProfiles/LinearExponentialImpl.hpp @@ -32,10 +32,7 @@ namespace picongpu using ParamClass = T_ParamClass; template - struct apply - { - using type = LinearExponentialImpl; - }; + using fn = LinearExponentialImpl; HINLINE LinearExponentialImpl(uint32_t currentStep) { diff --git a/include/picongpu/particles/densityProfiles/SphereFlanksImpl.hpp b/include/picongpu/particles/densityProfiles/SphereFlanksImpl.hpp index b3e80c2d43..995db53dc5 100644 --- a/include/picongpu/particles/densityProfiles/SphereFlanksImpl.hpp +++ b/include/picongpu/particles/densityProfiles/SphereFlanksImpl.hpp @@ -33,10 +33,7 @@ namespace picongpu using ParamClass = T_ParamClass; template - struct apply - { - using type = SphereFlanksImpl; - }; + using fn = SphereFlanksImpl; HINLINE SphereFlanksImpl(uint32_t currentStep) { diff --git a/include/picongpu/particles/filter/All.hpp b/include/picongpu/particles/filter/All.hpp index 385cf68abb..32f3f6ae4a 100644 --- a/include/picongpu/particles/filter/All.hpp +++ b/include/picongpu/particles/filter/All.hpp @@ -54,10 +54,7 @@ namespace picongpu struct All { template - struct apply - { - using type = All; - }; + using fn = All; /** create filter for the accelerator * diff --git a/include/picongpu/particles/filter/RelativeGlobalDomainPosition.hpp b/include/picongpu/particles/filter/RelativeGlobalDomainPosition.hpp index eead404f5c..4795a036f0 100644 --- a/include/picongpu/particles/filter/RelativeGlobalDomainPosition.hpp +++ b/include/picongpu/particles/filter/RelativeGlobalDomainPosition.hpp @@ -102,10 +102,7 @@ namespace picongpu using Params = T_Params; template - struct apply - { - using type = RelativeGlobalDomainPosition; - }; + using fn = RelativeGlobalDomainPosition; HINLINE RelativeGlobalDomainPosition() { diff --git a/include/picongpu/particles/filter/generic/Free.hpp b/include/picongpu/particles/filter/generic/Free.hpp index 87811fd009..89ced48e46 100644 --- a/include/picongpu/particles/filter/generic/Free.hpp +++ b/include/picongpu/particles/filter/generic/Free.hpp @@ -74,10 +74,7 @@ namespace picongpu using Functor = functor::User; template - struct apply - { - using type = Free; - }; + using fn = Free; /** constructor * diff --git a/include/picongpu/particles/filter/generic/FreeRng.hpp b/include/picongpu/particles/filter/generic/FreeRng.hpp index 2d1bc1ff7e..165ef79efa 100644 --- a/include/picongpu/particles/filter/generic/FreeRng.hpp +++ b/include/picongpu/particles/filter/generic/FreeRng.hpp @@ -79,10 +79,7 @@ namespace picongpu , private picongpu::particles::functor::misc::Rng { template - struct apply - { - using type = FreeRng; - }; + using fn = FreeRng; using RngGenerator = picongpu::particles::functor::misc::Rng; diff --git a/include/picongpu/particles/filter/generic/FreeTotalCellOffset.def b/include/picongpu/particles/filter/generic/FreeTotalCellOffset.def index 4a61f2bb56..c9bb08ab6c 100644 --- a/include/picongpu/particles/filter/generic/FreeTotalCellOffset.def +++ b/include/picongpu/particles/filter/generic/FreeTotalCellOffset.def @@ -21,9 +21,6 @@ #include "picongpu/simulation_defines.hpp" -#include - - namespace picongpu { namespace particles diff --git a/include/picongpu/particles/filter/generic/FreeTotalCellOffset.hpp b/include/picongpu/particles/filter/generic/FreeTotalCellOffset.hpp index 442966302e..33677222ad 100644 --- a/include/picongpu/particles/filter/generic/FreeTotalCellOffset.hpp +++ b/include/picongpu/particles/filter/generic/FreeTotalCellOffset.hpp @@ -91,10 +91,7 @@ namespace picongpu using Functor = functor::User; template - struct apply - { - using type = FreeTotalCellOffset; - }; + using fn = FreeTotalCellOffset; /** constructor * diff --git a/include/picongpu/particles/ionization/byCollision/ThomasFermi/ThomasFermi.def b/include/picongpu/particles/ionization/byCollision/ThomasFermi/ThomasFermi.def index 0fccd424d4..830ed40f06 100644 --- a/include/picongpu/particles/ionization/byCollision/ThomasFermi/ThomasFermi.def +++ b/include/picongpu/particles/ionization/byCollision/ThomasFermi/ThomasFermi.def @@ -31,7 +31,7 @@ namespace picongpu * * @tparam T_DestSpecies electron species to be created * @tparam T_SrcSpecies particle species that is ionized - * default is boost::mpl placeholder because specialization + * default is placeholder because specialization * cannot be known in list of particle species' flags * @see speciesDefinition.param */ diff --git a/include/picongpu/particles/ionization/byField/ADK/ADK.def b/include/picongpu/particles/ionization/byField/ADK/ADK.def index ee004f3d86..105fab537f 100644 --- a/include/picongpu/particles/ionization/byField/ADK/ADK.def +++ b/include/picongpu/particles/ionization/byField/ADK/ADK.def @@ -34,7 +34,7 @@ namespace picongpu * @tparam T_DestSpecies electron species to be created * @tparam T_IonizationCurrent select type of ionization current (None or EnergyConservation) * @tparam T_SrcSpecies ion species to be ionized - * default is boost::mpl placeholder because specialization + * default is placeholder because specialization * cannot be known in list of particle species' flags * @see speciesDefinition.param */ @@ -42,7 +42,7 @@ namespace picongpu typename T_IonizationAlgorithm, typename T_DestSpecies, typename T_IonizationCurrent, - typename T_SrcSpecies = boost::mpl::_1> + typename T_SrcSpecies = pmacc::_1> struct ADK_Impl; /** Ammosov-Delone-Krainov tunneling model - linear laser polarization diff --git a/include/picongpu/particles/ionization/byField/BSI/BSI.def b/include/picongpu/particles/ionization/byField/BSI/BSI.def index b3db73dbf9..b5156ffe57 100644 --- a/include/picongpu/particles/ionization/byField/BSI/BSI.def +++ b/include/picongpu/particles/ionization/byField/BSI/BSI.def @@ -34,7 +34,7 @@ namespace picongpu * @tparam T_DestSpecies electron species to be created * @tparam T_IonizationCurrent select type of ionization current (None or EnergyConservation) * @tparam T_SrcSpecies particle species that is ionized - * default is boost::mpl placeholder because specialization + * default is placeholder because specialization * cannot be known in list of particle species' flags * @see speciesDefinition.param */ @@ -42,7 +42,7 @@ namespace picongpu typename T_IonizationAlgorithm, typename T_DestSpecies, typename T_IonizationCurrent, - typename T_SrcSpecies = boost::mpl::_1> + typename T_SrcSpecies = pmacc::_1> struct BSI_Impl; /** Barrier Suppression Ionization - Hydrogen-Like diff --git a/include/picongpu/particles/ionization/byField/Keldysh/Keldysh.def b/include/picongpu/particles/ionization/byField/Keldysh/Keldysh.def index bd26daa579..984b6f69ba 100644 --- a/include/picongpu/particles/ionization/byField/Keldysh/Keldysh.def +++ b/include/picongpu/particles/ionization/byField/Keldysh/Keldysh.def @@ -34,7 +34,7 @@ namespace picongpu * @tparam T_DestSpecies electron species to be created * @tparam T_IonizationCurrent select type of ionization current (None or EnergyConservation) * @tparam T_SrcSpecies ion species to be ionized - * default is boost::mpl placeholder because specialization + * default is placeholder because specialization * cannot be known in list of particle species' flags * @see speciesDefinition.param */ @@ -42,7 +42,7 @@ namespace picongpu typename T_IonizationAlgorithm, typename T_DestSpecies, typename T_IonizationCurrent, - typename T_SrcSpecies = boost::mpl::_1> + typename T_SrcSpecies = pmacc::_1> struct Keldysh_Impl; /** Keldysh ionization model diff --git a/include/picongpu/particles/manipulators/generic/Free.hpp b/include/picongpu/particles/manipulators/generic/Free.hpp index feebde3231..e8acadce73 100644 --- a/include/picongpu/particles/manipulators/generic/Free.hpp +++ b/include/picongpu/particles/manipulators/generic/Free.hpp @@ -72,10 +72,7 @@ namespace picongpu using Functor = functor::User; template - struct apply - { - using type = Free; - }; + using fn = Free; /** constructor * diff --git a/include/picongpu/particles/manipulators/generic/FreeRng.hpp b/include/picongpu/particles/manipulators/generic/FreeRng.hpp index dae8259798..b0c98af3d3 100644 --- a/include/picongpu/particles/manipulators/generic/FreeRng.hpp +++ b/include/picongpu/particles/manipulators/generic/FreeRng.hpp @@ -79,10 +79,7 @@ namespace picongpu , private picongpu::particles::functor::misc::Rng { template - struct apply - { - using type = FreeRng; - }; + using fn = FreeRng; using RngGenerator = picongpu::particles::functor::misc::Rng; diff --git a/include/picongpu/particles/manipulators/unary/FreeTotalCellOffset.hpp b/include/picongpu/particles/manipulators/unary/FreeTotalCellOffset.hpp index d5c2e65e75..047add8400 100644 --- a/include/picongpu/particles/manipulators/unary/FreeTotalCellOffset.hpp +++ b/include/picongpu/particles/manipulators/unary/FreeTotalCellOffset.hpp @@ -84,10 +84,7 @@ namespace picongpu using Functor = functor::User; template - struct apply - { - using type = FreeTotalCellOffset; - }; + using fn = FreeTotalCellOffset; /** constructor * diff --git a/include/picongpu/particles/manipulators/unary/FreeTotalCellOffsetRng.hpp b/include/picongpu/particles/manipulators/unary/FreeTotalCellOffsetRng.hpp index 5104948737..3029f0871f 100644 --- a/include/picongpu/particles/manipulators/unary/FreeTotalCellOffsetRng.hpp +++ b/include/picongpu/particles/manipulators/unary/FreeTotalCellOffsetRng.hpp @@ -93,10 +93,7 @@ namespace picongpu using Distribution = T_Distribution; template - struct apply - { - using type = FreeTotalCellOffsetRng; - }; + using fn = FreeTotalCellOffsetRng; /** constructor * diff --git a/include/picongpu/particles/particleToGrid/ComputeGridValuePerFrame.def b/include/picongpu/particles/particleToGrid/ComputeGridValuePerFrame.def index c8545572d7..3aa2866600 100644 --- a/include/picongpu/particles/particleToGrid/ComputeGridValuePerFrame.def +++ b/include/picongpu/particles/particleToGrid/ComputeGridValuePerFrame.def @@ -43,8 +43,6 @@ #include -#include - #include @@ -197,7 +195,7 @@ namespace picongpu using FilteredAttribute = FilteredDerivedAttribute; using type = typename traits::GenerateSolversIfSpeciesEligible< - CreateFieldTmpOperation, + CreateFieldTmpOperation, SeqSpecies, FilteredAttribute>::type; }; diff --git a/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.def b/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.def index 8d45e006ca..8586cab5e8 100644 --- a/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.def +++ b/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.def @@ -25,9 +25,6 @@ #include -#include - - namespace picongpu { namespace particles diff --git a/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.hpp b/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.hpp index b024e56dab..dbfad2bbaa 100644 --- a/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.hpp +++ b/include/picongpu/particles/startPosition/RandomPositionAndWeightingImpl.hpp @@ -25,9 +25,6 @@ #include "picongpu/particles/startPosition/detail/WeightMacroParticles.hpp" #include "picongpu/particles/startPosition/generic/FreeRng.def" -#include - - namespace picongpu { namespace particles diff --git a/include/picongpu/particles/startPosition/generic/Free.hpp b/include/picongpu/particles/startPosition/generic/Free.hpp index 61c5a711a5..90ce0242d0 100644 --- a/include/picongpu/particles/startPosition/generic/Free.hpp +++ b/include/picongpu/particles/startPosition/generic/Free.hpp @@ -79,10 +79,7 @@ namespace picongpu using Functor = T_Functor; template - struct apply - { - using type = Free; - }; + using fn = Free; /** constructor * diff --git a/include/picongpu/particles/startPosition/generic/FreeRng.hpp b/include/picongpu/particles/startPosition/generic/FreeRng.hpp index 96df8d0dbc..a007489441 100644 --- a/include/picongpu/particles/startPosition/generic/FreeRng.hpp +++ b/include/picongpu/particles/startPosition/generic/FreeRng.hpp @@ -84,10 +84,7 @@ namespace picongpu , private picongpu::particles::functor::misc::Rng { template - struct apply - { - using type = FreeRng; - }; + using fn = FreeRng; using RngGenerator = picongpu::particles::functor::misc::Rng; diff --git a/include/picongpu/particles/traits/GenerateSolversIfSpeciesEligible.hpp b/include/picongpu/particles/traits/GenerateSolversIfSpeciesEligible.hpp index 89af7e7bb7..26aef92853 100644 --- a/include/picongpu/particles/traits/GenerateSolversIfSpeciesEligible.hpp +++ b/include/picongpu/particles/traits/GenerateSolversIfSpeciesEligible.hpp @@ -21,10 +21,9 @@ #include "picongpu/particles/traits/SpeciesEligibleForSolver.hpp" +#include #include -#include - namespace picongpu { namespace particles @@ -64,7 +63,7 @@ namespace picongpu using SeqEligibleSpecies = pmacc::mp_copy_if; template - using Op = typename boost::mpl::apply1::type; + using Op = pmacc::Apply; using type = pmacc::mp_transform; }; } // namespace traits diff --git a/include/picongpu/particles/traits/GetIonizerList.hpp b/include/picongpu/particles/traits/GetIonizerList.hpp index fdc8a958f2..fdbf6c9142 100644 --- a/include/picongpu/particles/traits/GetIonizerList.hpp +++ b/include/picongpu/particles/traits/GetIonizerList.hpp @@ -21,13 +21,12 @@ #include "picongpu/simulation_defines.hpp" +#include #include #include #include #include -#include - namespace picongpu { @@ -57,7 +56,7 @@ namespace picongpu using type = typename pmacc::OperateOnSeq< FoundIonizerList, - boost::mpl::apply1, + pmacc::Apply, pmacc::meta::accessors::Type<>>::type; }; diff --git a/include/picongpu/particles/traits/GetMarginPusher.hpp b/include/picongpu/particles/traits/GetMarginPusher.hpp index 5ac50a39ee..355f15c88f 100644 --- a/include/picongpu/particles/traits/GetMarginPusher.hpp +++ b/include/picongpu/particles/traits/GetMarginPusher.hpp @@ -36,29 +36,17 @@ namespace picongpu * @tparam T_GetLowerMargin lower margin for pusher getter type * @tparam T_GetUpperMargin upper margin for pusher getter type */ - template< - typename T_Species, - typename T_GetLowerMargin = GetLowerMargin>, - typename T_GetUpperMargin = GetUpperMargin>> + template struct GetMarginPusher { - using AddLowerMargins - = pmacc::math::CT::add>, T_GetLowerMargin>; - using LowerMargin = typename boost::mpl::apply::type; + private: + using Interpolation = typename GetInterpolation::type; - using AddUpperMargins - = pmacc::math::CT::add>, T_GetUpperMargin>; - using UpperMargin = typename boost::mpl::apply::type; - }; - - /** Get lower margin of a pusher for species - * - * @tparam T_Species particle species type - */ - template - struct GetLowerMarginPusher - { - using type = typename traits::GetMarginPusher::LowerMargin; + public: + using LowerMargin = + typename pmacc::math::CT::add::type, T_GetLowerMargin>::type; + using UpperMargin = + typename pmacc::math::CT::add::type, T_GetUpperMargin>::type; }; /** Get lower margin of the given pusher for species @@ -78,14 +66,13 @@ namespace picongpu typename GetUpperMargin::type>::LowerMargin; }; - /** Get upper margin of a pusher for species + /** Get lower margin of a pusher for species * * @tparam T_Species particle species type */ template - struct GetUpperMarginPusher + struct GetLowerMarginPusher : GetLowerMarginForPusher::type> { - using type = typename traits::GetMarginPusher::UpperMargin; }; /** Get upper margin of the given pusher for species @@ -105,5 +92,14 @@ namespace picongpu typename GetUpperMargin::type>::UpperMargin; }; + /** Get upper margin of a pusher for species + * + * @tparam T_Species particle species type + */ + template + struct GetUpperMarginPusher : GetUpperMarginForPusher::type> + { + }; + } // namespace traits } // namespace picongpu diff --git a/include/picongpu/particles/traits/GetShape.hpp b/include/picongpu/particles/traits/GetShape.hpp index b8a91bba1d..926e8caedd 100644 --- a/include/picongpu/particles/traits/GetShape.hpp +++ b/include/picongpu/particles/traits/GetShape.hpp @@ -33,6 +33,7 @@ namespace picongpu { using type = typename pmacc::traits::Resolve< typename GetFlagType>::type>::type; + static_assert(!std::is_void_v); }; } // namespace traits diff --git a/include/picongpu/plugins/BinEnergyParticles.hpp b/include/picongpu/plugins/BinEnergyParticles.hpp index 9a4bed0b7c..bfd3b3af6f 100644 --- a/include/picongpu/plugins/BinEnergyParticles.hpp +++ b/include/picongpu/plugins/BinEnergyParticles.hpp @@ -230,7 +230,7 @@ namespace picongpu boost::program_options::options_description& desc, std::string const& masterPrefix = std::string{}) override { - meta::ForEach> getEligibleFilterNames; + meta::ForEach> getEligibleFilterNames; getEligibleFilterNames(allowedFilters); concatenatedFilterNames = plugins::misc::concatenateToString(allowedFilters, ", "); @@ -448,7 +448,7 @@ namespace picongpu mapper, std::placeholders::_1); - meta::ForEach>{}( + meta::ForEach>{}( m_help->filter.get(m_id), currentStep, bindKernel); diff --git a/include/picongpu/plugins/ChargeConservation.tpp b/include/picongpu/plugins/ChargeConservation.tpp index 6cc8ee2bd4..fae5862a66 100644 --- a/include/picongpu/plugins/ChargeConservation.tpp +++ b/include/picongpu/plugins/ChargeConservation.tpp @@ -197,8 +197,8 @@ namespace picongpu /* calculate and add the charge density values from all species in FieldTmp */ meta::ForEach< EligibleSpecies, - picongpu::detail::ComputeChargeDensity>, - boost::mpl::_1> + picongpu::detail::ComputeChargeDensity>, + pmacc::_1> computeChargeDensity; computeChargeDensity(fieldTmp.get(), currentStep); diff --git a/include/picongpu/plugins/Emittance.hpp b/include/picongpu/plugins/Emittance.hpp index b1c1cc7fb0..bfe4f784f6 100644 --- a/include/picongpu/plugins/Emittance.hpp +++ b/include/picongpu/plugins/Emittance.hpp @@ -237,7 +237,7 @@ namespace picongpu boost::program_options::options_description& desc, std::string const& masterPrefix = std::string{}) override { - meta::ForEach> getEligibleFilterNames; + meta::ForEach> getEligibleFilterNames; getEligibleFilterNames(allowedFilters); concatenatedFilterNames = plugins::misc::concatenateToString(allowedFilters, ", "); @@ -489,7 +489,7 @@ namespace picongpu mapper, std::placeholders::_1); - meta::ForEach>{}( + meta::ForEach>{}( m_help->filter.get(m_id), currentStep, binaryKernel); diff --git a/include/picongpu/plugins/EnergyParticles.hpp b/include/picongpu/plugins/EnergyParticles.hpp index 5e98fa5629..cacc0a8294 100644 --- a/include/picongpu/plugins/EnergyParticles.hpp +++ b/include/picongpu/plugins/EnergyParticles.hpp @@ -195,7 +195,7 @@ namespace picongpu boost::program_options::options_description& desc, std::string const& masterPrefix = std::string{}) override { - meta::ForEach> getEligibleFilterNames; + meta::ForEach> getEligibleFilterNames; getEligibleFilterNames(allowedFilters); concatenatedFilterNames = plugins::misc::concatenateToString(allowedFilters, ", "); @@ -360,7 +360,7 @@ namespace picongpu mapper, std::placeholders::_1); - meta::ForEach>{}( + meta::ForEach>{}( m_help->filter.get(m_id), currentStep, binaryKernel); diff --git a/include/picongpu/plugins/PhaseSpace/PhaseSpace.hpp b/include/picongpu/plugins/PhaseSpace/PhaseSpace.hpp index bac9ce7b44..c036d885f1 100644 --- a/include/picongpu/plugins/PhaseSpace/PhaseSpace.hpp +++ b/include/picongpu/plugins/PhaseSpace/PhaseSpace.hpp @@ -100,7 +100,7 @@ namespace picongpu boost::program_options::options_description& desc, std::string const& masterPrefix = std::string{}) override { - meta::ForEach> getEligibleFilterNames; + meta::ForEach> getEligibleFilterNames; getEligibleFilterNames(allowedFilters); concatenatedFilterNames = plugins::misc::concatenateToString(allowedFilters, ", "); diff --git a/include/picongpu/plugins/PhaseSpace/PhaseSpace.tpp b/include/picongpu/plugins/PhaseSpace/PhaseSpace.tpp index 0b0fa499f4..7e58041cc8 100644 --- a/include/picongpu/plugins/PhaseSpace/PhaseSpace.tpp +++ b/include/picongpu/plugins/PhaseSpace/PhaseSpace.tpp @@ -186,7 +186,7 @@ namespace picongpu // particle filter std::placeholders::_1); - meta::ForEach>{}( + meta::ForEach>{}( m_help->filter.get(m_id), currentStep, bindFunctor); diff --git a/include/picongpu/plugins/PluginController.hpp b/include/picongpu/plugins/PluginController.hpp index 01af47444d..09ff021cb0 100644 --- a/include/picongpu/plugins/PluginController.hpp +++ b/include/picongpu/plugins/PluginController.hpp @@ -112,8 +112,7 @@ namespace picongpu * with two components */ template - using Apply = typename boost::mpl:: - apply1, pmacc::mp_at_c>::type; + using Apply = pmacc::Apply, pmacc::mp_at_c>; /** Check the combination Species+Plugin in the Tuple * @@ -151,24 +150,24 @@ namespace picongpu /* define species plugins */ using UnspecializedSpeciesPlugins = pmacc::mp_list< - plugins::multi::Master>, - plugins::multi::Master>, - plugins::multi::Master>, - CountParticles, - PngPlugin>, - plugins::transitionRadiation::TransitionRadiation + plugins::multi::Master>, + plugins::multi::Master>, + plugins::multi::Master>, + CountParticles, + PngPlugin>, + plugins::transitionRadiation::TransitionRadiation #if ENABLE_OPENPMD , - plugins::radiation::Radiation + plugins::radiation::Radiation #endif #if(ENABLE_OPENPMD == 1) , - plugins::multi::Master>, - plugins::multi::Master> + plugins::multi::Master>, + plugins::multi::Master> #endif #if(ENABLE_OPENPMD == 1) , - PerSuperCell + PerSuperCell #endif >; @@ -189,7 +188,7 @@ namespace picongpu */ virtual void init() { - meta::ForEach> pushBack; + meta::ForEach> pushBack; pushBack(plugins); } diff --git a/include/picongpu/plugins/openPMD/WriteSpecies.hpp b/include/picongpu/plugins/openPMD/WriteSpecies.hpp index 3b7eebf51a..0810749063 100644 --- a/include/picongpu/plugins/openPMD/WriteSpecies.hpp +++ b/include/picongpu/plugins/openPMD/WriteSpecies.hpp @@ -43,8 +43,6 @@ #include #include -#include - #include #include // std::remove_reference_t @@ -107,14 +105,14 @@ namespace picongpu { /* malloc host memory */ log("openPMD: (begin) malloc host memory: %1%") % name; - meta::ForEach> mallocMem; + meta::ForEach> mallocMem; mallocMem(hostFrame, myNumParticles); log("openPMD: ( end ) malloc host memory: %1%") % name; } void free(openPMDFrameType& hostFrame) override { - meta::ForEach> freeMem; + meta::ForEach> freeMem; freeMem(hostFrame); } @@ -177,14 +175,14 @@ namespace picongpu { log("openPMD: (begin) malloc mapped memory: %1%") % name; /*malloc mapped memory*/ - meta::ForEach> mallocMem; + meta::ForEach> mallocMem; mallocMem(mappedFrame, myNumParticles); log("openPMD: ( end ) malloc mapped memory: %1%") % name; } void free(openPMDFrameType& mappedFrame) override { - meta::ForEach> freeMem; + meta::ForEach> freeMem; freeMem(mappedFrame); } @@ -418,7 +416,7 @@ namespace picongpu log("openPMD: (begin) write particle records for %1%") % T_SpeciesFilter::getName(); - meta::ForEach> + meta::ForEach> writeToOpenPMD; writeToOpenPMD( params, diff --git a/include/picongpu/plugins/openPMD/openPMDWriter.hpp b/include/picongpu/plugins/openPMD/openPMDWriter.hpp index dba93f1577..0bdbb7e60b 100644 --- a/include/picongpu/plugins/openPMD/openPMDWriter.hpp +++ b/include/picongpu/plugins/openPMD/openPMDWriter.hpp @@ -70,8 +70,6 @@ #include #include -#include - #include #if !defined(_WIN32) @@ -274,11 +272,11 @@ make sure that environment variable OPENPMD_BP_BACKEND is not set to ADIOS1. boost::program_options::options_description& desc, std::string const& masterPrefix = std::string{}) override { - meta::ForEach> + meta::ForEach> getEligibleDataSourceNames; getEligibleDataSourceNames(allowedDataSources); - meta::ForEach> appendFieldSourceNames; + meta::ForEach> appendFieldSourceNames; appendFieldSourceNames(allowedDataSources); // string list with all possible particle sources @@ -1109,11 +1107,11 @@ make sure that environment variable OPENPMD_BP_BACKEND is not set to ADIOS1. mThreadParams.localWindowToDomainOffset = DataSpace::create(0); /* load all fields */ - meta::ForEach> ForEachLoadFields; + meta::ForEach> ForEachLoadFields; ForEachLoadFields(&mThreadParams); /* load all particles */ - meta::ForEach> ForEachLoadSpecies; + meta::ForEach> ForEachLoadSpecies; ForEachLoadSpecies(&mThreadParams, restartChunkSize); loadRngStates(&mThreadParams); @@ -1201,7 +1199,7 @@ make sure that environment variable OPENPMD_BP_BACKEND is not set to ADIOS1. * them for sure (checkpoint) or just some user-defined species * (dump) */ - meta::ForEach> copySpeciesToHost; + meta::ForEach> copySpeciesToHost; copySpeciesToHost(); lastSpeciesSyncStep = currentStep; } @@ -1537,19 +1535,19 @@ make sure that environment variable OPENPMD_BP_BACKEND is not set to ADIOS1. log("openPMD: (begin) writing fields."); if(threadParams->isCheckpoint) { - meta::ForEach> ForEachGetFields; + meta::ForEach> ForEachGetFields; ForEachGetFields(threadParams); } else { if(dumpFields) { - meta::ForEach> ForEachGetFields; + meta::ForEach> ForEachGetFields; ForEachGetFields(threadParams); } // move over all field data sources - meta::ForEach>{}( + meta::ForEach>{}( vectorOfDataSourceNames, threadParams); } @@ -1563,8 +1561,8 @@ make sure that environment variable OPENPMD_BP_BACKEND is not set to ADIOS1. meta::ForEach< FileCheckpointParticles, WriteSpecies< - plugins::misc::SpeciesFilter, - plugins::misc::UnfilteredSpecies>> + plugins::misc::SpeciesFilter, + plugins::misc::UnfilteredSpecies>> writeSpecies; writeSpecies(threadParams, particleToTotalDomainOffset); } @@ -1574,15 +1572,13 @@ make sure that environment variable OPENPMD_BP_BACKEND is not set to ADIOS1. if(dumpAllParticles) { // move over all species defined in FileOutputParticles - meta::ForEach< - FileOutputParticles, - WriteSpecies>> + meta::ForEach>> writeSpecies; writeSpecies(threadParams, particleToTotalDomainOffset); } // move over all species data sources - meta::ForEach>{}( + meta::ForEach>{}( vectorOfDataSourceNames, threadParams, particleToTotalDomainOffset); diff --git a/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp b/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp index 074b7e15a8..8b2cd335d5 100644 --- a/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp +++ b/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp @@ -32,8 +32,6 @@ #include #include -#include - #include #include @@ -134,12 +132,11 @@ namespace picongpu openPMDFrameType mappedFrame; log("openPMD: malloc mapped memory: %1%") % speciesName; /*malloc mapped memory*/ - meta::ForEach> mallocMem; + meta::ForEach> mallocMem; mallocMem(mappedFrame, totalNumParticles); - meta:: - ForEach> - loadAttributes; + meta::ForEach> + loadAttributes; loadAttributes(params, mappedFrame, particleSpecies, particleOffset, totalNumParticles); if(totalNumParticles != 0) @@ -155,7 +152,7 @@ namespace picongpu picLog::INPUT_OUTPUT()); /*free host memory*/ - meta::ForEach> freeMem; + meta::ForEach> freeMem; freeMem(mappedFrame); } log("openPMD: ( end ) load species: %1%") % speciesName; diff --git a/include/picongpu/plugins/output/WriteSpeciesCommon.hpp b/include/picongpu/plugins/output/WriteSpeciesCommon.hpp index 4c66612abf..4849020185 100644 --- a/include/picongpu/plugins/output/WriteSpeciesCommon.hpp +++ b/include/picongpu/plugins/output/WriteSpeciesCommon.hpp @@ -124,11 +124,8 @@ namespace picongpu struct OperatorCreateVectorBox { template - struct apply - { - using type - = pmacc::meta::Pair::type::type>>; - }; + using fn + = pmacc::meta::Pair::type::type>>; }; } // namespace picongpu diff --git a/include/picongpu/plugins/output/images/Visualisation.hpp b/include/picongpu/plugins/output/images/Visualisation.hpp index 5ac2b4783c..2e0673cfce 100644 --- a/include/picongpu/plugins/output/images/Visualisation.hpp +++ b/include/picongpu/plugins/output/images/Visualisation.hpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -164,7 +165,7 @@ namespace picongpu HDINLINE static float_X getAmplitude() { using Profiles = fields::incidentField::UniqueEnabledProfiles; - meta::ForEach> calculateMaxAmplitude; + meta::ForEach> calculateMaxAmplitude; auto maxAmplitude = 0.0_X; calculateMaxAmplitude(maxAmplitude); return maxAmplitude; diff --git a/include/picongpu/plugins/particleCalorimeter/ParticleCalorimeter.hpp b/include/picongpu/plugins/particleCalorimeter/ParticleCalorimeter.hpp index 46f486115d..de44588fe5 100644 --- a/include/picongpu/plugins/particleCalorimeter/ParticleCalorimeter.hpp +++ b/include/picongpu/plugins/particleCalorimeter/ParticleCalorimeter.hpp @@ -438,7 +438,7 @@ namespace picongpu boost::program_options::options_description& desc, std::string const& masterPrefix = std::string{}) override { - meta::ForEach> getEligibleFilterNames; + meta::ForEach> getEligibleFilterNames; getEligibleFilterNames(allowedFilters); concatenatedFilterNames = plugins::misc::concatenateToString(allowedFilters, ", "); @@ -578,7 +578,7 @@ namespace picongpu endInternalCellsLocal, std::placeholders::_1); - meta::ForEach>{}( + meta::ForEach>{}( m_help->filter.get(m_id), currentStep, unaryKernel); @@ -644,7 +644,7 @@ namespace picongpu endExternalCellsLocal, std::placeholders::_1); - meta::ForEach>{}( + meta::ForEach>{}( m_help->filter.get(m_id), Environment<>::get().SimulationDescription().getCurrentStep(), unaryKernel); diff --git a/include/picongpu/simulation/control/Simulation.hpp b/include/picongpu/simulation/control/Simulation.hpp index d480d70ae6..62b4c1208f 100644 --- a/include/picongpu/simulation/control/Simulation.hpp +++ b/include/picongpu/simulation/control/Simulation.hpp @@ -79,7 +79,6 @@ #include #include -#include #include #include @@ -354,7 +353,8 @@ namespace picongpu #endif // Allocate and initialize particle species with all left-over memory below - meta::ForEach> createSpeciesMemory; + + meta::ForEach> createSpeciesMemory; createSpeciesMemory(deviceHeap, cellDescription.get()); size_t freeGpuMem = freeDeviceMemory(); @@ -394,7 +394,7 @@ namespace picongpu #endif - meta::ForEach> + meta::ForEach> logMemoryStatisticsForSpecies; logMemoryStatisticsForSpecies(deviceHeap); @@ -463,7 +463,7 @@ namespace picongpu else { initialiserController->init(); - meta::ForEach> initSpecies; + meta::ForEach> initSpecies; initSpecies(0); /* Remove all particles that are outside the respective boundaries * (this can happen if density functor didn't account for it). @@ -556,7 +556,7 @@ namespace picongpu void resetAll(uint32_t currentStep) override { resetFields(currentStep); - meta::ForEach> resetParticles; + meta::ForEach> resetParticles; resetParticles(currentStep); } @@ -569,7 +569,7 @@ namespace picongpu log("slide in step %1%") % currentStep; resetAll(currentStep); initialiserController->slide(currentStep); - meta::ForEach> initSpecies; + meta::ForEach> initSpecies; initSpecies(currentStep); } } diff --git a/include/picongpu/simulation/stage/AtomicPhysics.hpp b/include/picongpu/simulation/stage/AtomicPhysics.hpp index c0ec2be34f..4a99eae00d 100644 --- a/include/picongpu/simulation/stage/AtomicPhysics.hpp +++ b/include/picongpu/simulation/stage/AtomicPhysics.hpp @@ -25,6 +25,7 @@ // actual call to kernel found here #include #include +#include #include @@ -81,9 +82,8 @@ namespace picongpu typename pmacc::particles::traits::FilterByFlag>::type; //! kernel to be called for each species - pmacc::meta:: - ForEach> - callAtomicPhysics; + pmacc::meta::ForEach> + callAtomicPhysics; /** Description of cell structure used for PIC-Simulations. * diff --git a/include/picongpu/simulation/stage/CurrentDeposition.hpp b/include/picongpu/simulation/stage/CurrentDeposition.hpp index 085e8b7b19..bd9155953b 100644 --- a/include/picongpu/simulation/stage/CurrentDeposition.hpp +++ b/include/picongpu/simulation/stage/CurrentDeposition.hpp @@ -74,7 +74,7 @@ namespace picongpu typename pmacc::particles::traits::FilterByFlag>::type; meta::ForEach< SpeciesWithCurrentSolver, - detail::CurrentDeposition>> + detail::CurrentDeposition>> depositCurrent; depositCurrent(step, fieldJ, dc); } diff --git a/include/picongpu/simulation/stage/IterationStart.hpp b/include/picongpu/simulation/stage/IterationStart.hpp index 32beee1b16..c7ff550c15 100644 --- a/include/picongpu/simulation/stage/IterationStart.hpp +++ b/include/picongpu/simulation/stage/IterationStart.hpp @@ -44,7 +44,7 @@ namespace picongpu */ void operator()(uint32_t const step) const { - meta::ForEach> callFunctors; + meta::ForEach> callFunctors; callFunctors(step); } }; diff --git a/include/picongpu/simulation/stage/ParticleBoundaries.hpp b/include/picongpu/simulation/stage/ParticleBoundaries.hpp index 3e6faea786..21b2762053 100644 --- a/include/picongpu/simulation/stage/ParticleBoundaries.hpp +++ b/include/picongpu/simulation/stage/ParticleBoundaries.hpp @@ -231,7 +231,7 @@ namespace picongpu using SpeciesWithPusher = typename pmacc::particles::traits::FilterByFlag>::type; //! Functor to process all affected species - meta::ForEach> processSpecies; + meta::ForEach> processSpecies; }; } // namespace stage diff --git a/include/picongpu/simulation/stage/ParticleIonization.hpp b/include/picongpu/simulation/stage/ParticleIonization.hpp index 65f2a2f979..e77401e6a5 100644 --- a/include/picongpu/simulation/stage/ParticleIonization.hpp +++ b/include/picongpu/simulation/stage/ParticleIonization.hpp @@ -58,8 +58,7 @@ namespace picongpu { using pmacc::particles::traits::FilterByFlag; using SpeciesWithIonizers = typename FilterByFlag>::type; - pmacc::meta::ForEach> - particleIonization; + pmacc::meta::ForEach> particleIonization; particleIonization(cellDescription, step); } diff --git a/include/picongpu/simulation/stage/RuntimeDensityFile.hpp b/include/picongpu/simulation/stage/RuntimeDensityFile.hpp index 1fd6c9eea8..0441717dc1 100644 --- a/include/picongpu/simulation/stage/RuntimeDensityFile.hpp +++ b/include/picongpu/simulation/stage/RuntimeDensityFile.hpp @@ -116,7 +116,7 @@ namespace picongpu private: //! Functor to process all species - meta::ForEach> processSpecies; + meta::ForEach> processSpecies; }; } // namespace stage diff --git a/include/pmacc/functor/Call.hpp b/include/pmacc/functor/Call.hpp index 40a04efdf8..92ef1b63d7 100644 --- a/include/pmacc/functor/Call.hpp +++ b/include/pmacc/functor/Call.hpp @@ -23,11 +23,8 @@ #include "pmacc/types.hpp" -#include - #include - namespace pmacc { namespace functor @@ -37,7 +34,7 @@ namespace pmacc * @tparam T_Functor stateless unary functor type, must be default-constructible and * operator() must take the current time step as the only parameter */ - template + template struct Call { //! Functor type diff --git a/include/pmacc/functor/Filtered.hpp b/include/pmacc/functor/Filtered.hpp index 87af554977..d8d0928299 100644 --- a/include/pmacc/functor/Filtered.hpp +++ b/include/pmacc/functor/Filtered.hpp @@ -95,13 +95,7 @@ namespace pmacc * A unary filters means that each argument can only pass the same filter * check before its results are combined. */ - template< - typename T_FilterOperator, - typename T_Filter, - typename T_Functor, - uint32_t T_numFunctorArguments - - > + template struct Filtered< T_FilterOperator, filter::Interface, @@ -109,14 +103,8 @@ namespace pmacc : private filter::Interface , Interface { - template - struct apply - { - using type = Filtered< - T_FilterOperator, - typename boost::mpl::apply::type, - typename boost::mpl::apply::type>; - }; + // template + // using fn = Filtered, Apply>; using Filter = filter::Interface; using Functor = Interface; diff --git a/include/pmacc/mappings/simulation/ResourceMonitor.tpp b/include/pmacc/mappings/simulation/ResourceMonitor.tpp index 41c932125c..a54bc73ae7 100644 --- a/include/pmacc/mappings/simulation/ResourceMonitor.tpp +++ b/include/pmacc/mappings/simulation/ResourceMonitor.tpp @@ -70,7 +70,7 @@ namespace pmacc { using dim = std::integral_constant; std::vector particleCounts; - meta::ForEach> countParticles; + meta::ForEach> countParticles; countParticles(particleCounts, cellDescription, parFilter); return particleCounts; } diff --git a/include/pmacc/math/MapTuple.hpp b/include/pmacc/math/MapTuple.hpp index 055a2cc156..610b75ca7a 100644 --- a/include/pmacc/math/MapTuple.hpp +++ b/include/pmacc/math/MapTuple.hpp @@ -28,8 +28,6 @@ namespace pmacc { namespace math { - namespace bmpl = boost::mpl; - /** wrap a datum * * @tparam T_Pair mp_list< key, type of the value > diff --git a/include/pmacc/math/vector/compile-time/Vector.hpp b/include/pmacc/math/vector/compile-time/Vector.hpp index b77caaf7ea..c9d9d0a87c 100644 --- a/include/pmacc/math/vector/compile-time/Vector.hpp +++ b/include/pmacc/math/vector/compile-time/Vector.hpp @@ -24,8 +24,6 @@ #include "pmacc/math/vector/Vector.hpp" #include "pmacc/types.hpp" -#include - #include namespace pmacc diff --git a/include/pmacc/meta/Apply.hpp b/include/pmacc/meta/Apply.hpp new file mode 100644 index 0000000000..9543715e4c --- /dev/null +++ b/include/pmacc/meta/Apply.hpp @@ -0,0 +1,82 @@ +/* Copyright 2022 Bernhard Manfred Gruber + * + * This file is part of PMacc. + * + * PMacc is free software: you can redistribute it and/or modify + * it under the terms of either the GNU General Public License or + * the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PMacc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License and the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * and the GNU Lesser General Public License along with PMacc. + * If not, see . + */ + +#pragma once + +#include "Mp11.hpp" + +namespace pmacc +{ + namespace detail + { + template + struct ReplacePlaceholdersImpl + { + using type = E; + }; + template + struct ReplacePlaceholdersImpl, Args...> + { + using type = mp_at_c, I>; + }; + + template typename E, typename... Ts, typename... Args> + struct ReplacePlaceholdersImpl, Args...> + { + using type = E::type...>; + // nested ::type of E to mimic mpl::apply + // using type = typename E::type...>::type; + }; + } // namespace detail + + template + using ReplacePlaceholders = typename detail::ReplacePlaceholdersImpl::type; + + namespace detail + { + template + inline constexpr bool isPlaceholderExpression = false; + + template + inline constexpr bool isPlaceholderExpression> = true; + + template typename L, typename... Ts> + inline constexpr bool isPlaceholderExpression> = (isPlaceholderExpression || ... || false); + + template> + struct ApplyImpl : Expression + { + }; + + template + struct ApplyImpl + { + template + using fn = ReplacePlaceholders; + }; + } // namespace detail + + /// Equivalent of boost::mpl::apply. If Expression contains placeholders (such as _1 etc.), the placeholders are + /// replaced by Args via pmacc::ReplacePlaceholders. If there are no placeholders, Expression is treated as a + /// quoted meta function and the Expression::fn is returned. + template + using Apply = typename detail::ApplyImpl::template fn; +} // namespace pmacc diff --git a/include/pmacc/meta/ForEach.hpp b/include/pmacc/meta/ForEach.hpp index 925365ea47..a0eece2083 100644 --- a/include/pmacc/meta/ForEach.hpp +++ b/include/pmacc/meta/ForEach.hpp @@ -21,21 +21,18 @@ #pragma once -#include "pmacc/meta/accessors/Identity.hpp" - -#include +#include "Apply.hpp" +#include "Mp11.hpp" #include namespace pmacc::meta { - /** Compile-Time for each for Boost::MPL Type Lists + /** Compile-Time for each for type lists * * @tparam List An mp_list. * @tparam T_Functor An unary lambda functor with a HDINLINE void operator()(...) method - * _1 is substituted by Accessor's result using boost::mpl::apply with elements from T_MPLSeq. - * The maximum number of parameters for the operator() is limited by - * PMACC_MAX_FUNCTOR_OPERATOR_PARAMS + * _1 is substituted by Accessor's result using Apply with elements from List. * @tparam T_Accessor An unary lambda operation * * Example: @@ -43,20 +40,17 @@ namespace pmacc::meta * Functor = any unary lambda functor * Accessor = lambda operation identity * - * definition: F(X) means boost::apply - * * call: ForEach()(42); * unrolled code: Functor(Accessor(int))(42); * Functor(Accessor(float))(42); */ - template> + template> struct ForEach { - template - using ReplacePlaceholder = - typename boost::mpl::apply1::type>::type; + template + using MakeFunctor = Apply::type>; - using SolvedFunctors = mp_transform; + using SolvedFunctors = mp_transform; template HDINLINE void operator()(T_Types&&... ts) const diff --git a/include/pmacc/meta/GetKeyFromAlias.hpp b/include/pmacc/meta/GetKeyFromAlias.hpp index 1602429c06..4a1ff15a3c 100644 --- a/include/pmacc/meta/GetKeyFromAlias.hpp +++ b/include/pmacc/meta/GetKeyFromAlias.hpp @@ -23,12 +23,9 @@ #include "pmacc/meta/conversion/SeqToMap.hpp" #include "pmacc/meta/conversion/TypeToAliasPair.hpp" -#include "pmacc/meta/conversion/TypeToPair.hpp" #include "pmacc/meta/errorHandlerPolicies/ReturnType.hpp" #include "pmacc/types.hpp" -#include - #include namespace pmacc @@ -44,29 +41,28 @@ namespace pmacc template> struct GetKeyFromAlias { - private: + public: // FIXME(bgruber): all the boost::mp11:: qualifications inside this class work around nvcc 11.0 not finding the // mp_* templates - using KeyNotFoundPolicy = T_KeyNotFoundPolicy; /*create a map where Key is a undeclared alias and value is real type*/ - using AliasMap = typename SeqToMap>::type; + using AliasMap = typename SeqToMap>::type; /*create a map where Key and value is real type*/ - using KeyMap = typename SeqToMap>::type; + using KeyMap = typename SeqToMap>::type; /*combine both maps*/ using FullMap = boost::mp11::mp_fold; /* search for given key, * - we get the real type if key found - * - else we get boost::mpl::void_ + * - else we get void */ using MapType = boost::mp11::mp_map_find; public: /* Check for KeyNotFound and calculate final type. (Uses lazy evaluation) */ using type = typename boost::mp11::mp_if< - std::is_same, - boost::mpl::apply, - boost::mp11::mp_defer>::type; + boost::mp11::mp_map_contains, + boost::mp11::mp_defer, + boost::mp11::mp_defer>::type; }; } // namespace pmacc diff --git a/include/pmacc/meta/accessors/Identity.hpp b/include/pmacc/meta/accessors/Identity.hpp index 2efb641f82..47c7014ae0 100644 --- a/include/pmacc/meta/accessors/Identity.hpp +++ b/include/pmacc/meta/accessors/Identity.hpp @@ -24,8 +24,6 @@ #include "pmacc/types.hpp" -#include - namespace pmacc { namespace meta @@ -37,12 +35,11 @@ namespace pmacc * @tparam T in type * */ - template + template struct Identity { using type = T; }; - } // namespace accessors } // namespace meta diff --git a/include/pmacc/meta/accessors/Type.hpp b/include/pmacc/meta/accessors/Type.hpp index b514beeff2..eb004164a2 100644 --- a/include/pmacc/meta/accessors/Type.hpp +++ b/include/pmacc/meta/accessors/Type.hpp @@ -23,9 +23,6 @@ #include "pmacc/types.hpp" -#include - - namespace pmacc { namespace meta @@ -38,7 +35,7 @@ namespace pmacc * * T must have defined ::type */ - template + template struct Type { using type = typename T::type; diff --git a/include/pmacc/meta/conversion/ApplyGuard.hpp b/include/pmacc/meta/conversion/ApplyGuard.hpp index 89b0542ed3..a387c073c6 100644 --- a/include/pmacc/meta/conversion/ApplyGuard.hpp +++ b/include/pmacc/meta/conversion/ApplyGuard.hpp @@ -51,10 +51,7 @@ namespace pmacc struct ApplyGuard { template - struct apply - { - using type = T_LockedType; - }; + using fn = T_LockedType; }; } // namespace pmacc diff --git a/include/pmacc/meta/conversion/OperateOnSeq.hpp b/include/pmacc/meta/conversion/OperateOnSeq.hpp index 281c408514..1f293265d1 100644 --- a/include/pmacc/meta/conversion/OperateOnSeq.hpp +++ b/include/pmacc/meta/conversion/OperateOnSeq.hpp @@ -21,12 +21,11 @@ #pragma once +#include "pmacc/meta/Apply.hpp" #include "pmacc/meta/Mp11.hpp" #include "pmacc/meta/accessors/Identity.hpp" #include "pmacc/types.hpp" -#include - namespace pmacc { /** run an unary operator on each element of a sequence @@ -38,12 +37,13 @@ namespace pmacc * from the sequence is passed to T_UnaryOperator * @return ::type mp_list */ - template> + template struct OperateOnSeq { - template - using Op = - typename boost::mpl::apply1::type>::type; + static_assert(detail::isPlaceholderExpression); + + template + using Op = Apply>; using type = mp_transform; }; diff --git a/include/pmacc/meta/conversion/SeqToMap.hpp b/include/pmacc/meta/conversion/SeqToMap.hpp index 0cb8cd2d95..7961637710 100644 --- a/include/pmacc/meta/conversion/SeqToMap.hpp +++ b/include/pmacc/meta/conversion/SeqToMap.hpp @@ -21,30 +21,27 @@ #pragma once -#include "pmacc/meta/accessors/Identity.hpp" #include "pmacc/types.hpp" -#include - namespace pmacc { /** convert a list to a map * * @tparam T_List an mp_list. * @tparam T_UnaryOperator unary operator to translate type from the sequence - * to a mpl pair + * to a mp_list pair * @tparam T_Accessor An unary lambda operator which is used before the type * from the sequence is passed to T_UnaryOperator * @return ::type mpl map */ - template> + template struct SeqToMap { template - using Op = - typename boost::mpl::apply1::type>::type; + using Op = Apply>; + + using ListOfPairs = mp_transform; - using ListOfTuples = mp_transform; - using type = mp_fold, mp_map_insert>; + using type = mp_fold, mp_map_insert>; }; } // namespace pmacc diff --git a/include/pmacc/meta/conversion/ToSeq.hpp b/include/pmacc/meta/conversion/ToSeq.hpp index 0f6a70d548..d95fcb554d 100644 --- a/include/pmacc/meta/conversion/ToSeq.hpp +++ b/include/pmacc/meta/conversion/ToSeq.hpp @@ -28,13 +28,13 @@ namespace pmacc namespace detail { template - struct ToSeq + struct ToSeqImpl { using type = mp_list; }; template - struct ToSeq> + struct ToSeqImpl> { using type = mp_list; }; @@ -43,5 +43,5 @@ namespace pmacc /** If T_Type is an mp_list, return it. Otherwise wrap it in an mp_list. */ template - using ToSeq = typename detail::ToSeq::type; + using ToSeq = typename detail::ToSeqImpl::type; } // namespace pmacc diff --git a/include/pmacc/meta/conversion/TypeToAliasPair.hpp b/include/pmacc/meta/conversion/TypeToAliasPair.hpp index 948cd3ac79..9dc44bc81d 100644 --- a/include/pmacc/meta/conversion/TypeToAliasPair.hpp +++ b/include/pmacc/meta/conversion/TypeToAliasPair.hpp @@ -28,6 +28,23 @@ namespace pmacc { + namespace detail + { + template + struct TypeToAliasPairImpl + { + using type = TypeToPair; + }; + + /** specialisation if T_Type is a pmacc alias*/ + template class T_Alias, typename T_Type> + struct TypeToAliasPairImpl> + { + using type + = pmacc::meta::Pair, T_Alias>; + }; + } // namespace detail + /** create pmacc::meta::Pair * * If T_Type is a pmacc alias than first is set to anonym alias name @@ -38,18 +55,5 @@ namespace pmacc * @resturn ::type */ template - struct TypeToAliasPair - { - using type = typename TypeToPair::type; - }; - - /** specialisation if T_Type is a pmacc alias*/ - template class T_Alias, typename T_Type> - struct TypeToAliasPair> - { - using type - = pmacc::meta::Pair, T_Alias>; - }; - - + using TypeToAliasPair = typename detail::TypeToAliasPairImpl::type; } // namespace pmacc diff --git a/include/pmacc/meta/conversion/TypeToPair.hpp b/include/pmacc/meta/conversion/TypeToPair.hpp index ec1f964565..5c901b685d 100644 --- a/include/pmacc/meta/conversion/TypeToPair.hpp +++ b/include/pmacc/meta/conversion/TypeToPair.hpp @@ -32,10 +32,5 @@ namespace pmacc * @resturn ::type pmacc::meta::Pair where first and second is set to T_Type */ template - struct TypeToPair - { - using type = pmacc::meta::Pair; - }; - - + using TypeToPair = pmacc::meta::Pair; } // namespace pmacc diff --git a/include/pmacc/meta/errorHandlerPolicies/ReturnType.hpp b/include/pmacc/meta/errorHandlerPolicies/ReturnType.hpp index 2fdc3d0844..bf131fc9d4 100644 --- a/include/pmacc/meta/errorHandlerPolicies/ReturnType.hpp +++ b/include/pmacc/meta/errorHandlerPolicies/ReturnType.hpp @@ -34,10 +34,7 @@ namespace pmacc struct ReturnType { template - struct apply - { - using type = T_ReturnType; - }; + using fn = T_ReturnType; }; } // namespace errorHandlerPolicies diff --git a/include/pmacc/meta/errorHandlerPolicies/ReturnValue.hpp b/include/pmacc/meta/errorHandlerPolicies/ReturnValue.hpp index d0c51a0a0c..920dd5bcaa 100644 --- a/include/pmacc/meta/errorHandlerPolicies/ReturnValue.hpp +++ b/include/pmacc/meta/errorHandlerPolicies/ReturnValue.hpp @@ -33,10 +33,7 @@ namespace pmacc struct ReturnValue { template - struct apply - { - using type = T_Value; - }; + using fn = T_Value; }; } // namespace errorHandlerPolicies diff --git a/include/pmacc/meta/errorHandlerPolicies/ThrowValueNotFound.hpp b/include/pmacc/meta/errorHandlerPolicies/ThrowValueNotFound.hpp index 50760d6a35..8db41a3964 100644 --- a/include/pmacc/meta/errorHandlerPolicies/ThrowValueNotFound.hpp +++ b/include/pmacc/meta/errorHandlerPolicies/ThrowValueNotFound.hpp @@ -34,7 +34,7 @@ namespace pmacc struct ThrowValueNotFound { template - struct apply + struct fn { /* The compiler is allowed to evaluate an expression that does not depend on a template parameter * even if the class is never instantiated. In that case static assert is always @@ -45,7 +45,6 @@ namespace pmacc * `sizeof(ANY_TYPE) != 0` is always true and defers the evaluation. */ PMACC_CASSERT_MSG_TYPE(value_not_found_in_seq, T_Value, false && (sizeof(T_MPLSeq) != 0)); - using type = boost::mpl::void_; }; }; diff --git a/include/pmacc/particles/ParticleDescription.hpp b/include/pmacc/particles/ParticleDescription.hpp index 9c176dd595..687c9a66d5 100644 --- a/include/pmacc/particles/ParticleDescription.hpp +++ b/include/pmacc/particles/ParticleDescription.hpp @@ -44,7 +44,7 @@ namespace pmacc * (e.g. calculate mass, gamma, ...) * (e.g. useSolverXY, calcRadiation, ...) * @tparam T_FrameExtensionList sequence or single class with frame extensions - * - extension must be an unary template class that supports boost::mpl::apply1<> + * - extension must be an unary template class that supports Apply<> * - type of the final frame is applied to each extension class * (this allows pointers and references to a frame itself) * - the final frame that uses ParticleDescription inherits from all diff --git a/include/pmacc/particles/memory/buffers/ParticlesBuffer.hpp b/include/pmacc/particles/memory/buffers/ParticlesBuffer.hpp index 1294f567c2..bad3d65764 100644 --- a/include/pmacc/particles/memory/buffers/ParticlesBuffer.hpp +++ b/include/pmacc/particles/memory/buffers/ParticlesBuffer.hpp @@ -50,13 +50,10 @@ namespace pmacc template struct OperatorCreatePairStaticArray { - template - struct apply - { - using type = meta::Pair< - X, - StaticArray::type::type, std::integral_constant>>; - }; + template + using fn = meta::Pair< + T, + StaticArray::type::type, std::integral_constant>>; }; } // namespace detail diff --git a/include/pmacc/particles/memory/dataTypes/ListPointer.hpp b/include/pmacc/particles/memory/dataTypes/ListPointer.hpp index e662b4a972..b5a47ab49a 100644 --- a/include/pmacc/particles/memory/dataTypes/ListPointer.hpp +++ b/include/pmacc/particles/memory/dataTypes/ListPointer.hpp @@ -27,13 +27,13 @@ namespace pmacc { - template + template struct PreviousFramePtr { PMACC_ALIGN(previousFrame, Pointer); }; - template + template struct NextFramePtr { PMACC_ALIGN(nextFrame, Pointer); diff --git a/include/pmacc/particles/memory/dataTypes/Particle.hpp b/include/pmacc/particles/memory/dataTypes/Particle.hpp index aa5089c20c..8dbb2fb1a0 100644 --- a/include/pmacc/particles/memory/dataTypes/Particle.hpp +++ b/include/pmacc/particles/memory/dataTypes/Particle.hpp @@ -37,8 +37,6 @@ #include "pmacc/traits/HasIdentifier.hpp" #include "pmacc/types.hpp" -#include - #include namespace pmacc @@ -226,11 +224,11 @@ namespace pmacc { using pmacc::meta::ForEach; /* assign attributes from src to dest*/ - ForEach> copy; + ForEach> copy; copy(dest, src); /* set all attributes which are not in src to their default value*/ - ForEach> setAttributeToDefault; + ForEach> setAttributeToDefault; setAttributeToDefault(dest); }; }; diff --git a/include/pmacc/particles/memory/frames/Frame.hpp b/include/pmacc/particles/memory/frames/Frame.hpp index f1aa883bc4..8b35beea58 100644 --- a/include/pmacc/particles/memory/frames/Frame.hpp +++ b/include/pmacc/particles/memory/frames/Frame.hpp @@ -22,6 +22,7 @@ #pragma once #include "pmacc/math/MapTuple.hpp" +#include "pmacc/meta/Apply.hpp" #include "pmacc/meta/GetKeyFromAlias.hpp" #include "pmacc/meta/conversion/OperateOnSeq.hpp" #include "pmacc/meta/conversion/SeqToMap.hpp" @@ -34,8 +35,6 @@ #include "pmacc/traits/HasIdentifier.hpp" #include "pmacc/types.hpp" -#include - namespace pmacc { namespace pmath = pmacc::math; @@ -60,9 +59,9 @@ namespace pmacc typename SeqToMap::type> , public InheritLinearly>>::type>> + mp_transform_q< + mp_bind>, + typename T_ParticleDescription::FrameExtensionList>>> { using ParticleDescription = T_ParticleDescription; using Name = typename ParticleDescription::Name; diff --git a/include/pmacc/particles/meta/FindByNameOrType.hpp b/include/pmacc/particles/meta/FindByNameOrType.hpp index 814fe14658..fbf07b99d7 100644 --- a/include/pmacc/particles/meta/FindByNameOrType.hpp +++ b/include/pmacc/particles/meta/FindByNameOrType.hpp @@ -21,11 +21,10 @@ #pragma once +#include "pmacc/meta/Apply.hpp" #include "pmacc/meta/errorHandlerPolicies/ThrowValueNotFound.hpp" #include "pmacc/traits/GetCTName.hpp" -#include - #include namespace pmacc @@ -63,7 +62,7 @@ namespace pmacc using type = typename mp_if< mp_empty, - boost::mpl::apply, + mp_defer, mp_defer>::type; }; diff --git a/include/pmacc/types.hpp b/include/pmacc/types.hpp index 8344eaa11f..c665f73d0e 100644 --- a/include/pmacc/types.hpp +++ b/include/pmacc/types.hpp @@ -50,6 +50,7 @@ #include "pmacc/dimensions/Definition.hpp" #include "pmacc/eventSystem/EventType.hpp" #include "pmacc/memory/Align.hpp" +#include "pmacc/meta/Apply.hpp" #include "pmacc/meta/Mp11.hpp" #include "pmacc/ppFunctions.hpp" #include "pmacc/type/Area.hpp" diff --git a/share/picongpu/tests/compileCombinedAttributes/include/picongpu/param/fileOutput.param b/share/picongpu/tests/compileCombinedAttributes/include/picongpu/param/fileOutput.param index fba3824cad..ff8ec0b00f 100644 --- a/share/picongpu/tests/compileCombinedAttributes/include/picongpu/param/fileOutput.param +++ b/share/picongpu/tests/compileCombinedAttributes/include/picongpu/param/fileOutput.param @@ -28,9 +28,6 @@ #include "picongpu/particles/particleToGrid/CombinedDerive.def" #include "picongpu/particles/particleToGrid/ComputeGridValuePerFrame.def" -#include - - namespace picongpu { /** FieldTmp output (calculated at runtime) *******************************