Skip to content

docs: full review + reflect performance optimizations and API changes#184

Merged
wegamekinglc merged 1 commit into
masterfrom
docs/full-review-and-perf-reflect
Jun 28, 2026
Merged

docs: full review + reflect performance optimizations and API changes#184
wegamekinglc merged 1 commit into
masterfrom
docs/full-review-and-perf-reflect

Conversation

@wegamekinglc

Copy link
Copy Markdown
Owner

Summary

Full review of docs/ for structure, conciseness, readability, formatting, and cross-references, plus reconciliation against the current master source after recent performance and API changes. Every edit is grounded in the current source.

Documented (confirmed on master):

  • docs/methodology/random.md — Sobol polish_ member and the 5-arg NewSobol / SobolRSG_ constructors (polish defaults to false, halving per-deviate InverseNCDF cost at unchanged QMC accuracy; persisted by the storable markup). Source: dal-cpp/dal/math/random/sobol.hpp, sobol.cpp.
  • docs/methodology/pde.mdFD1D_ cached implicit-operator decomposition (cachedDecomp_, CacheHit, DecompositionsSinceInit), reused across time-homogeneous rolls. Source: dal-cpp/dal/math/pde/fd1d.hpp, fd1d.cpp.

Stale references fixed (ClearRewind):

  • docs/methodology/yield_curve.mdTapeGuard_ description and the joint-path recording contract now correctly state Rewind. TapeGuard_ calls Dal::AAD::Rewind on construction and destruction (not Clear); verified in dal-cpp/dal/curve/tapeguard.hpp.
  • docs/methodology/yield_curve_jacobian.mdTapeGuard_ "rewinds" (was "clears").
  • docs/experimental/aad-analytic-jacobian-curve-calibration.md — recording contract starts with Rewind(*Tape()).

Index sync: docs/README.md bullets for random.md and pde.md updated. docs/README.md and CLAUDE.md methodology lists are complete and in sync (all 14 methodology docs).

Deliberately NOT documented (exist only on unmerged feature branches, not on master):

  • P8 banded TriMultiply neighbour-correction loop fusion — only on perf/p7-p8-fused-sweeps (commit 61115fa is not an ancestor of master); master ships the original unfused three-pass TriMultiply. matrix.md is already correct.
  • -ffp-contract=fast / /fp:contract in Platform.cmake — only on perf/enable-fp-contract-all-compilers. installation.md is already correct.
  • volatile / mutable / no-large-comments style rules — not present in .claude/rules/code-style.md; no doc references them.

No CHANGELOG entry — this is a docs polish/reconciliation pass, below the fundamental-change bar.

Test plan

No test suite applies to a docs-only change. Manual verification performed:

  • Read current headers/sources (sobol.hpp, sobol.cpp, fd1d.hpp, fd1d.cpp, tapeguard.hpp, calibration.cpp, jointcalibration.cpp) to ground each edit.
  • Confirmed P1 Rewind, P3 PDE caching, P4 Sobol polish, and CurveSolverOptions_ are on master; confirmed P8 fusion and fp-contract are NOT ancestors of master.
  • Cross-checked the aad.md Rewind methodology against the updated yield_curve.md / yield_curve_jacobian.md / experimental note for vocabulary consistency.
  • Verified docs/README.md and CLAUDE.md methodology lists match (14 docs each).
  • Verified no trailing whitespace and every changed file ends with a newline.
  • Verified math delimiters ($$) are balanced in the changed methodology docs.
  • Confirmed no source files (.cpp/.hpp/.h) or dal-cpp/dal/auto/ files were modified.

Co-Authored-By: Claude noreply@anthropic.com

Reconcile docs against current master after recent performance and API
changes. Each edit is grounded in the current source; capabilities that
exist only on unmerged feature branches (P8 TriMultiply fusion,
-ffp-contract=fast) are deliberately not documented, since docs describe
the single current version.

- random.md: document the Sobol `polish_` member and the 5-arg
  `NewSobol` / `SobolRSG_` constructors (polish defaults to false,
  halving per-deviate InverseNCDF cost at unchanged QMC accuracy).
- pde.md: document the cached implicit-operator decomposition in FD1D_
  (cachedDecomp_, CacheHit, DecompositionsSinceInit) reused across
  time-homogeneous rolls.
- yield_curve.md, yield_curve_jacobian.md, and the AAD analytic-Jacobian
  experimental note: correct the recording contract to start with
  `Rewind` rather than `Clear`. TapeGuard_ calls Dal::AAD::Rewind on
  construction and destruction (not Clear), matching the aad.md
  methodology and the actual calibration / joint-calibration sources.

Index entries in docs/README.md updated for the new random.md and pde.md
content. No CHANGELOG entry: this is a docs reconciliation pass, below
the fundamental-change bar.

Co-Authored-By: Claude <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@wegamekinglc wegamekinglc marked this pull request as ready for review June 28, 2026 11:41
Copilot AI review requested due to automatic review settings June 28, 2026 11:41
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28320955718

Coverage decreased (-0.004%) to 81.491%

Details

  • Coverage decreased (-0.004%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 67 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

67 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
dal-cpp/dal/math/matrix/banded.cpp 67 47.75%

Coverage Stats

Coverage Status
Relevant Lines: 7796
Covered Lines: 6353
Line Coverage: 81.49%
Coverage Strength: 3228948.3 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Docs-only reconciliation pass across DAL’s methodology notes to reflect current master behavior after recent AAD API and performance-related changes (notably Rewind vs Clear, Sobol normal-draw knobs, and FD1D_ decomposition caching), plus index updates.

Changes:

  • Updated AAD recording/RAII wording in yield-curve docs to use Rewind instead of Clear.
  • Added/expanded methodology details for Sobol normal-draw settings (polish_, precise_) and FD1D_ cached implicit decomposition behavior.
  • Updated docs/README.md methodology bullets to reflect the above additions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/README.md Updates methodology index bullets for PDE caching and Sobol normal-draw knobs.
docs/methodology/yield_curve.md Rewords TapeGuard_/recording-contract documentation to use Rewind and explain allocation reuse vs Clear.
docs/methodology/yield_curve_jacobian.md Updates joint calibration TapeGuard wording (clearsrewinds).
docs/methodology/random.md Adds a Sobol “Normal-Draw Precision and polish_” section documenting constructor surfaces and persistence.
docs/methodology/pde.md Documents FD1D_ cached implicit-operator decomposition and cache-hit conditions.
docs/experimental/aad-analytic-jacobian-curve-calibration.md Updates the backend-neutral recording contract to start with Rewind(*Tape()).

Comment on lines 137 to 139
no fallback. `CalibrateJointMultiCurve` is single-threaded: the AAD tape is
thread-local and a `TapeGuard_` clears it on entry and exit (also under
thread-local and a `TapeGuard_` rewinds it on entry and exit (also under
exception unwind), so concurrent calls would corrupt the tape.
Comment on lines +193 to +194
- `precise_` selects a higher-accuracy inverse-normal-CDF routine, mirroring the
pseudo-random family.
Comment thread docs/README.md
Comment on lines 108 to 111
- Brownian bridge: bisection order, conditional mean/variance, variation normalization
- Sobol direction numbers and the Gray-code $O(1)$ recurrence
- Sobol normal-draw precision knobs: `precise_` (high-accuracy inverse CDF) and `polish_` (Newton polish, default off)
- Path seeking via direct state reconstruction (`SobolSet_::SkipTo`, MRG32k32a matrix jump)
@wegamekinglc wegamekinglc merged commit 619cfee into master Jun 28, 2026
46 checks passed
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.

3 participants