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

Restrict checking ArrayView validity to debug mode. #16115

Merged
merged 1 commit into from Oct 10, 2023

Conversation

bangerth
Copy link
Member

This restricts the changes in #16112 to debug mode only. I can't really imagine it making a difference -- surely whatever we do with the contents of an ArrayView is more expensive than just a single if -- but there is also no harm in only checking in debug mode.

Fixes #16113.

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.

This is also a solution; I was not entirely opposed to it, but wanted to measure it before looking further into it, in most cases you are of course right that the things we do are much more expensive usually. Thanks @bangerth for the fix.

@tamiko tamiko merged commit 3f2375a into dealii:master Oct 10, 2023
15 checks passed
@bangerth bangerth deleted the debug branch October 10, 2023 21:41
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.

ArrayView: Audit generated code due to setting nullptr in constructor
4 participants