Skip to content
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 2/2) #3983

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

bernhardmgruber
Copy link
Contributor

@bernhardmgruber bernhardmgruber commented Feb 11, 2022

This is a continuation of the epic saga started in #3834. It continues by refactoring the seqence meta algorithms and replaces boost::mpl::apply.

@bernhardmgruber
Copy link
Contributor Author

The only MPL thing missing here is BOOST_MPL_ASSERT_MSG in static_assert.hpp. @psychocoderHPC how would you replace that?

@psychocoderHPC
Copy link
Member

I have this PR on my radar and will try to rebase and test it together with #3834 soon.

{
using type = E<typename ReplacePlaceholdersImpl<Ts, Args...>::type...>;
// nested ::type of E to mimic mpl::apply
//using type = typename E<typename ReplacePlaceholdersImpl<Ts, Args...>::type...>::type;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bernhardmgruber we need to activate this because I would say that we have many places where we rely on the recursive apply.

Never the less both versions currently not compile.

@psychocoderHPC psychocoderHPC added component: PMacc in PMacc refactoring code change to improve performance or to unify a concept but does not change public API labels Mar 30, 2023
{
using type = Free;
};
using fn = Free;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this called fn and not apply as in mpl?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because fn is mp11's terminology. See: https://www.boost.org/doc/libs/master/libs/mp11/doc/html/mp11.html:

A quoted metafunction is a class with a public metafunction member called fn, for example ...

Copy link
Member

@psychocoderHPC psychocoderHPC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found some issues.

typename boost::mpl::apply<T_Functor, T_Params...>::type>;
};
// template<typename... T_Params>
// using fn = Filtered<T_FilterOperator, Apply<T_Filter, T_Params...>, Apply<T_Functor, T_Params...>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that it is correct that this is removed.

The T_Filter and T_Functor must be updated with new signatures.

@@ -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<GetPusher<boost::mpl::_1>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong, the margins of the pusher will not be taken into account anymore.

Co-authored-by: René Widera <[email protected]>
@chillenzer
Copy link
Contributor

Is this still planned? @psychocoderHPC @bernhardmgruber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: PMacc in PMacc refactoring code change to improve performance or to unify a concept but does not change public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants