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

constexpr everything #487

Open
DiamonDinoia opened this issue Jul 17, 2024 · 2 comments
Open

constexpr everything #487

DiamonDinoia opened this issue Jul 17, 2024 · 2 comments

Comments

@DiamonDinoia
Copy link
Collaborator

We should constexpr everything available in c++17 as this allows to do part of the computation at compile time when the data is needed.

We should also add macros CPP_20_CONSTEXPR CPP_23_CONSTEXPR and have cmake use the latest available standard in compiling so that even malloc/free can be constexpr in that case. A lot of the planning phase might be executed at compile time when the users bake finufft in their code as a source, this can make a meaningful difference.

This can be done in #482 #483 as it requires some code rewrite anyway.

@DiamonDinoia DiamonDinoia mentioned this issue Jul 17, 2024
8 tasks
@DiamonDinoia DiamonDinoia added this to the 3.0 milestone Jul 17, 2024
@ahbarnett
Copy link
Collaborator

ahbarnett commented Jul 17, 2024 via email

@DiamonDinoia
Copy link
Collaborator Author

This is the most common argument that comes up when talking about constexpr everything. The goal to have the compiler do as much as possible at compile time. Not using constexpr might defer at runtime things that can be precomputed.

@DiamonDinoia DiamonDinoia mentioned this issue Jul 17, 2024
6 tasks
@DiamonDinoia DiamonDinoia removed this from the 2.3 milestone Jul 17, 2024
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

No branches or pull requests

2 participants