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

[WIP] Use more compile time options in PushPX kernel #4888

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

lucafedeli88
Copy link
Member

No description provided.

@AlexanderSinn
Copy link
Member

Looks good! In HiPACE++ we use kernels with up to 48 compile-time variants, so I agree WarpX can use more. I would like to suggest two small changes:

  • Use CompileTimeOptions<false, true> or  CompileTimeOptions<0, 1> instead of the enums. The compile time options use int internally, so the enums provide no extra type safety. To me, it looks like the enums add extra confusion, although this could be debatable.
  • Use if instead ofif constexpr, but still with the ..._control check inside it. In my testing, this gives still all the performance benefits since compilers can easily optimize out if (false) {...} while avoiding the lambda campture issues that arise with NVCC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants