• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wegamekinglc / Derivatives-Algorithms-Lib / 28288380668

27 Jun 2026 11:52AM UTC coverage: 80.556% (-0.1%) from 80.658%
28288380668

Pull #152

github

wegamekinglc
Fix AAD tape Clear regression: clear adjointsMulti_ unconditionally

Copilot on PR #152 correctly flagged that the ForEachBlock refactor changed
Clear's semantics: the original native-branch Clear cleared adjointsMulti_
unconditionally, but ForEachBlock guarded it on Tape_::multi_ (a runtime flag
toggled by SetNumResultsForAAD). A tape that ran multi (populating
adjointsMulti_), then toggled to non-multi, would retain stale adjoints on
Clear instead of wiping them.

- Split ForEachBlock (guarded, for Mark/Rewind/RewindToMark) from
  ForEachBlockAll (unconditional, for Clear) so each function preserves its
  original adjointsMulti_ clearing semantics. Mark/Rewind/RewindToMark were
  already guarded in the original and stay guarded.
- Add a one-line comment at ForEachBlockAll explaining why adjointsMulti_ is
  cleared unconditionally (so the next reader/Copilot sees it is intentional).
- Add regression test TestClearEmptiesAdjointsMultiAfterMultiToNonMultiToggle
  (native-gated) that toggles multi->non-multi and asserts adjointsMulti_ is
  emptied by Clear. Verified it fails against the buggy ForEachBlock-only form
  (8 stale adjoints retained) and passes with the fix.
- Add // namespace Dal closing-brace comments to fdm1dmesher.hpp and
  concentrating1dmesher.cpp (style item, files were touched by this PR).

Native: 753/753. XAD: 752/752 (regression test compiled out).
Pull Request #152: chore: dedup math structural (AAD iterators, tape loop, Sobol seek, mesher epilogue)

24 of 26 new or added lines in 4 files covered. (92.31%)

122 existing lines in 8 files now uncovered.

6293 of 7812 relevant lines covered (80.56%)

3223299.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

28.57
/dal-cpp/dal/indice/indexparse.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc