Fix B7 (PlanGrad unused allocation) and B2 (ABFPlusPlus hardcoded 1.F)#30
Merged
csparker247 merged 3 commits intodevelopfrom Mar 15, 2026
Merged
Fix B7 (PlanGrad unused allocation) and B2 (ABFPlusPlus hardcoded 1.F)#30csparker247 merged 3 commits intodevelopfrom
csparker247 merged 3 commits intodevelopfrom
Conversation
…ed 1.F) B7: Remove unused `auto edges = v->wheel()` in PlanGrad that wasted a heap allocation on every gradient evaluation. B2: Replace `1.F / it.value()` with `T(1) / it.value()` in LambdaStarInv inversion so double-precision instantiations are not silently truncated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Verifies that the T(1) fix produces correct double-precision results, catching any regression to the hardcoded 1.F literal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
auto edges = v->wheel()line inPlanGrad(ABF.hpp) that allocated a wheel vector on every gradient evaluation and immediately discarded it.1.F / it.value()withT(1) / it.value()in theLambdaStarInvinversion loop (ABFPlusPlus.hpp) so double-precision instantiations are not silently truncated tofloat.Test plan
ctest100%)Closes #12
Closes #7