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

MatrixFree: Use constexpr when selecting evaluator factory #15940

Merged
merged 1 commit into from Aug 29, 2023

Conversation

kronbichler
Copy link
Member

Since there is a lot of code involved inside the templated path for selecting an evaluator, we should let the compiler completely disable it when we work with fe_degree == -1 (that picks a precompiled version).

@bangerth bangerth merged commit b2819d6 into dealii:master Aug 29, 2023
15 checks passed
@bangerth
Copy link
Member

It surprises me that the compiler doesn't eliminate these code paths altogether, given that the variable tested is a compile-time constant.

@masterleinad
Copy link
Member

It surprises me that the compiler doesn't eliminate these code paths altogether, given that the variable tested is a compile-time constant.

The compiler is still required to instantiate and can discard unused code paths in a later pass.

@kronbichler kronbichler deleted the constexpr branch August 29, 2023 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants