-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace mpl by mp11 (part 1/2) #3834
Replace mpl by mp11 (part 1/2) #3834
Conversation
Looks definitely much shorter. |
079164c
to
f004222
Compare
bbafbe6
to
70cdd91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please rebase this PR and squash the changes, maybe add all .param changes into one commit, this would help to see what the user must change to be able to run old setups with the new required changes.
82277c2
to
02918db
Compare
Questions to move on:
|
Since pmacc is heavily depending on meta-programming I would be fine to pull mp11 into pmacc.
Yes would be possible but requires a separate PR. Why do you like to remove boost 1.65.1?
We can not get rid of compile time lambdas. Most functionality depends on it. I am fine with going on with this PR without removing the mpl lambdas.
I am fine with
I think if pmacc is pulling this dependency it is fine.
If possible I would prefer small PR and changing the parts step by step but since mpl is everywhere used it could be easier to change it within one PR.
I am fine to use
No PIConGPU is still C++14. We can switch the dev branch any time to C+17. The last time it was blocked by an issue in the dependency openPMD-api. |
ea63aa0
to
f183c9a
Compare
Done. All functionality is available as
Boost.Mp11 is available since Boost 1.66. PR here: #3939
OK!
template<typename First, typename Second>
struct Pair
{
using first = First;
using second = Second;
};
I created a new header
Can I take this as: Someone else is already working on that? |
13889a6
to
b43eb1b
Compare
About MPL Lambdas: I had a closer look on how they work and how this is solved in Mp11. In Mp11, Now, using meta::ForEach<FileOutputFields, GetFields<boost::mpl::_1>> ForEachGetFields;
ForEachGetFields(threadParams); to: meta::ForEach<FileOutputFields, GetFields> ForEachGetFields;
ForEachGetFields(threadParams); This is also reflected in Mp11, where many meta functions have a normal version accepting a meta function and a version accepting a quoted meta function (see What is still less elegant is transforming this from MPL: using UnspecializedSpeciesPlugins = pmacc::mp_list<
plugins::multi::Master<EnergyParticles<boost::mpl::_1>>,
plugins::multi::Master<CalcEmittance<boost::mpl::_1>>,
plugins::multi::Master<BinEnergyParticles<boost::mpl::_1>>,
CountParticles<boost::mpl::_1>,
PngPlugin<Visualisation<boost::mpl::_1, PngCreator>>,
plugins::transitionRadiation::TransitionRadiation<boost::mpl::_1>
>; With Mp11 bind: using UnspecializedSpeciesPlugins = pmacc::mp_list<
plugins::multi::Master<pmacc::mp_bind<EnergyParticles, pmacc::_1>>,
plugins::multi::Master<pmacc::mp_bind<CalcEmittance, pmacc::_1>>,
plugins::multi::Master<pmacc::mp_bind<BinEnergyParticles, pmacc::_1>>,
pmacc::mp_bind<CountParticles, pmacc::_1>,
PngPlugin<pmacc::mp_bind<Visualisation, pmacc::_1, PngCreator>>,
pmacc::mp_bind<plugins::transitionRadiation::TransitionRadiation, pmacc::_1>
>; If we want to support the original placeholder expressions (but using Mp11 placeholders), we could write our own meta function to evaluate it. The implementation is similar to Ultimately, we are going to need to look at the various cases and apply local judgement. But I believe we can solve it and make it look nice :) In a separate PR of course. |
b43eb1b
to
40a4260
Compare
ff01b50
to
dc01d6e
Compare
eb82ccb
to
3407568
Compare
0844383
to
22a6a80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes are required and we need to solve the warnings
created by meta::ForEach
include/picongpu/particles/particleToGrid/derivedAttributes/WeightedVelocity.def
Outdated
Show resolved
Hide resolved
8bf0fa8
to
49b7fa9
Compare
- shared memory: fix type deduction - workaround nvcc bugs
I will test this tomorrow on crusher and merge it if all works as expected. |
@bernhardmgruber Thanks for your hard work! |
This PR replaced most uses of
boost::mpl
byboost::mp11
. Onlyboost::mpl::apply
and the corresponding placeholders have not been replaced yet, because there is no direct equivalent in mp11. The functionality of mp11 is directly pulled into thepmacc
namespace, since all mp11 type functions are prefixed withmp_
.[update psychocoderHPC] This PR is making old input parameter sets incompatible due to the switch from
boost::mpl
toboost::mp11::mp_list
.