Skip to content

Symmetrize Hessian in-place during setup (0.5*(H+H'))#135

Merged
darnstrom merged 8 commits intomasterfrom
copilot/add-symmetrization-for-hessian
Mar 22, 2026
Merged

Symmetrize Hessian in-place during setup (0.5*(H+H'))#135
darnstrom merged 8 commits intomasterfrom
copilot/add-symmetrization-for-hessian

Conversation

Copy link
Contributor

Copilot AI commented Mar 22, 2026

  • Understand current code in daqp_update_Rinv
  • Move diagonal check before the packing step; for !is_factored scan upper-triangle of raw H directly (O(n²/2) reads, no writes)
  • In diagonal fast path read H[i*n+i] directly (no Rinv buffer needed)
  • Move packing step to after diagonal check, only reached for the dense Cholesky path
  • Move RinvD→Rinv restore guard to the dense path (not at function entry), matching v0.8.2's cleaner pointer management
  • Replace 1e-12 magic literals with zero_tol for consistency
  • Build and run all 21 Python tests (pass)
  • Benchmark diagonal H (NPROB=100, NREP=20): no regression vs v0.8.2 — current is ≤1% different at small n and −6 to −12% faster at n=50..200
  • Code review addressed (pointer swap, magic numbers)
  • CodeQL scan: 0 alerts

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add symmetrization of Hessian in DAQP setup Symmetrize Hessian in-place during setup (0.5*(H+H')) Mar 22, 2026
Copilot AI requested a review from darnstrom March 22, 2026 10:08
Copilot AI and others added 2 commits March 22, 2026 13:04
@darnstrom darnstrom marked this pull request as ready for review March 22, 2026 13:29
@darnstrom darnstrom merged commit 9e7b479 into master Mar 22, 2026
14 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.

2 participants