Skip to content

Bump sparsediff_linalg to v0.5.0 - #164

Merged
dance858 merged 1 commit into
mainfrom
bump-linalg-v0.5.0
Oct 13, 2026
Merged

dance858 merged 1 commit into
mainfrom
bump-linalg-v0.5.0

Conversation

@dance858

Copy link
Copy Markdown
Collaborator

Summary

This PR pins sparsediff_linalg to v0.5.0, up from cba21ac (v0.4.0+29), and migrates the engine to the new API. Behaviour is unchanged. Follow-up refactors are in a separate PR stacked on this one.

It takes in library PRs #21–#31. Most of them turned vtable slots into free functions:

removed slot replacement library PR
X->copy_sparsity(X) copy_sparsity_matrices_alloc(X) (21 sites) #24
X->DA_fill_values(d, X, C) DA_matrices_fill_values(d, X, C) #24
J->ATA_alloc(J) / J->ATDA_fill_values(J, d, H) ATA_matrices_alloc / ATDA_matrices_fill_values #26
block_left_mult_sparsity / _values BA_sparse_kron_matrices_* (the left_matmul.c sparse kron branch) #27
block_left_mult_vec BA_kron_vec_matrices #28
transpose_alloc / transpose_fill_values transpose_matrices_* #29
diag_vec_alloc / diag_vec_fill_values row_reduce_* with group[i] = i*(n+1), m_out = n*n (as in sum.c) #31

Include changes:

  • matmul_kron.h (Prod axis one #30) in left_matmul.c, bivariate_full_dom/matmul.c and quad_form.c;
  • matmul.h in elementwise_full_dom/common.c and in the two profiling harnesses.

#21, #22, #23 and #25 need nothing here: they made library internals private or added new API, and #22's helpers already live in convolve.c (#162).

left_matmul.c's Jchild_CSC, J_CSC and csc_to_csr_work are now unused. They are removed in the stacked follow-up PR.

Testing

  • Debug and Release: all 303 engine tests and all 201 library tests pass, the same counts as main.
  • PROFILE_ONLY=ON builds.
  • The compiler warnings are the same 5 as on main, all inside the library.
  • git grep finds no remaining calls to the removed slots.
  • clang-format is clean.

🤖 Generated with Claude Code

Pin the library at v0.5.0 (library PRs #21-#31) and migrate to its API.
No behaviour change.

- Vtable slots that became free functions:
  copy_sparsity -> copy_sparsity_matrices_alloc,
  DA_fill_values -> DA_matrices_fill_values,
  ATA_alloc / ATDA_fill_values -> ATA_matrices_alloc /
  ATDA_matrices_fill_values,
  transpose_alloc / transpose_fill_values -> transpose_matrices_*,
  block_left_mult_vec -> BA_kron_vec_matrices.
- left_matmul's sparse kron branch (n_blocks > 1) calls
  BA_sparse_kron_matrices_*, which replaces the removed
  block_left_mult_sparsity / block_left_mult_values slots.
- diag_vec's Jacobian is a row_reduce with group[i] = i*(n+1) and
  m_out = n*n, which replaces the removed diag_vec slots.
- Includes: matmul_kron.h where kron dispatchers are called (left_matmul,
  bivariate_full_dom/matmul, quad_form); matmul.h for ATA/ATDA in
  elementwise_full_dom/common.c and the profiling harnesses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dance858
dance858 merged commit 3bbcec7 into main Oct 13, 2026
14 checks passed
@dance858
dance858 deleted the bump-linalg-v0.5.0 branch October 15, 2026 05:39
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.

1 participant