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

Alternative way to avoid warnings. #13091

Merged
merged 1 commit into from Dec 16, 2021
Merged

Conversation

bangerth
Copy link
Member

This is an alternative to #13090 to fix #13051.

/rebuild

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

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

I agree with this one, it is safe to do like this and it would be a micro-optimization to try to avoid it. (The most common case is when all entries get overwritten below, but I'm not sure an extra if statement is useful, so let's go with this one.)

Copy link
Member

@tamiko tamiko left a comment

Choose a reason for hiding this comment

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

I am pretty sure that such a fill with nullptr via dof_indices.fill() has a better chance to get optimized than doing the equivalent task in the more complicated loop structure.

@drwells drwells merged commit e373e9a into dealii:master Dec 16, 2021
@bangerth bangerth deleted the warning-2 branch December 16, 2021 19:12
@bangerth
Copy link
Member Author

Yes, I don't think we should worry about putting a lot of zeros into a contiguous block of memory of known size :-)

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.

Warning with newer GCC versions in matrix_free/fe_evaluation.h
4 participants