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

CArena: shrink_in_place and operator<< #3621

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

WeiqunZhang
Copy link
Member

Summary

Implement CArena::shrink_in_place, which is used by PODVector::shrink_to_fit. It avoids a new memory allocation and data movement.

Add operator<< to CArena. This helps debugging.

Additional background

Follow-up on #3426.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

Implement CArena::shrink_in_place, which is used by
PODVector::shrink_to_fit. It avoids a new memory allocation and data
movement.

Add operator<< to CArena. This helps debugging.
@WeiqunZhang WeiqunZhang marked this pull request as ready for review November 10, 2023 18:15
@WeiqunZhang WeiqunZhang merged commit fa3743f into AMReX-Codes:development Nov 13, 2023
69 checks passed
@WeiqunZhang WeiqunZhang deleted the shrink_in_place branch November 13, 2023 23:01
guj pushed a commit to guj/amrex that referenced this pull request Dec 13, 2023
## Summary

Implement CArena::shrink_in_place, which is used by
PODVector::shrink_to_fit. It avoids a new memory allocation and data
movement.

Add operator<< to CArena. This helps debugging.

## Additional background

Follow-up on AMReX-Codes#3426.

## Checklist

The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [x] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
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.

2 participants