Optimize memory allocation during burn-in phase (#180)#460
Open
Omar-Abdo1 wants to merge 3 commits intoGeomScale:developfrom
Open
Optimize memory allocation during burn-in phase (#180)#460Omar-Abdo1 wants to merge 3 commits intoGeomScale:developfrom
Omar-Abdo1 wants to merge 3 commits intoGeomScale:developfrom
Conversation
vissarion
reviewed
Mar 12, 2026
Member
vissarion
left a comment
There was a problem hiding this comment.
Thanks for this PR. I have minor comments.
| Polytope &P, | ||
| RandomNumberGenerator &rng, | ||
| const unsigned int &walk_len, | ||
|
|
| }; | ||
|
|
||
| struct NullWalkPolicy{ | ||
|
|
Author
There was a problem hiding this comment.
Thanks for the review! I have fixed the indentation of NullWalkPolicy , I also removed the stress test files that were accidentally included. Please let me know if there are any further changes needed.
Author
There was a problem hiding this comment.
I have addressed all review comments — fixed the indentation , I noticed some cmake-clang checks are failing on certain compilers. Could you let me know if these are pre-existing CI issues, or if there is something I should look into on my end?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello @TolisChal @vissarion,
I was exploring the codebase and noticed Issue #180 regarding the inefficient memory handling during the burn-in phase. Currently, the loops store unstable points in
randPointsonly to clear them immediately after thenburnsblock.Changes made:
To resolve this and prevent unnecessary memory allocation, I introduced a
NullWalkPolicystruct.push_back_policy(and equivalent policies) withNullWalkPolicyacross allnburns > 0blocks ininclude/sampling.hpp.randPoints.clear()calls, as the vector remains empty during burn-in.The code compiles locally without issues and all C++ algorithms continue to function correctly. Let me know if you would like any adjustments or further optimizations to this approach!
Fixes #180