Skip to content

convolve: own the convolution-matrix helpers - #162

Merged
dance858 merged 1 commit into
mainfrom
convolve-own-conv-matrix
Oct 13, 2026
Merged

dance858 merged 1 commit into
mainfrom
convolve-own-conv-matrix

Conversation

@dance858

Copy link
Copy Markdown
Collaborator

Summary

  • conv_matrix_fill_sparsity / conv_matrix_fill_values build the Toeplitz matrix T(a) of convolve's 1D full convolution. convolve.c is their only caller, so they move here from sparsediff_linalg as static helpers.
  • They're copied verbatim (the function bodies diff identical to sparsediff_linalg/src/support/mini_numpy.c). convolve.c no longer includes csr_kernels.h.
  • No behavior change, and no pin bump.

This lets sparsediff_linalg drop them from its public API (companion library PR). Merge order: this PR first. Against the library without them, engine main fails to compile in convolve.c.

Testing

  • All 302 tests pass in Debug and Release. The convolve forward, Jacobian, Hessian and parameter-problem tests cover both helpers.
  • nm: convolve.c.o defines both as local symbols in Debug and inlines them in Release. The engine library has no undefined _conv_matrix_* references.
  • Built against the library branch with the functions removed: clean build, all 302 tests pass.

🤖 Generated with Claude Code

conv_matrix_fill_sparsity / conv_matrix_fill_values build the Toeplitz matrix
T(a) of convolve's 1D full convolution. convolve is their only caller, so
they move here from sparsediff_linalg as static helpers (verbatim copies),
and convolve no longer includes csr_kernels.h. This lets the library drop
them from its public API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dance858
dance858 merged commit 0719fd4 into main Oct 13, 2026
14 checks passed
@dance858
dance858 deleted the convolve-own-conv-matrix 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