Tags: SparseDifferentiation/SparseDiffPy
Tags
Sync convolve and matmul convention (#13) * sync SparseDiffEngine and adapt dense matmul bindings Bump SparseDiffEngine submodule to origin/main (45f88d0), which pulls in the new convolve atom plus dance858's cleanup of the dense matmul constructor data-pointer convention. new_left_matmul_dense / new_right_matmul_dense now require exactly one of param_node / data to be non-NULL (constants: (NULL, data); parameters: (capsule, NULL)) — the engine fprintf/exit(1)s otherwise. Update the dense branches of make_left_matmul and make_right_matmul bindings to match: drop the PARAM_FIXED wrapper we were building for the constant case, and forward data=NULL when a real parameter capsule is supplied. DNLP's helpers.py still hands in A.flatten() in both cases; the binding absorbs the new convention so no DNLP-side change is needed. Verified: SparseDiffEngine ctest (267/267), DNLP nlp_tests (217 passed, 77 skipped), DNLP test_convolution + test_atoms (119 passed). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * trim comments on dense matmul bindings Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bindings for diag_mat, upper_tri, and vstack atoms (#7) * Bindings for diag_mat, kron_left, upper_tri, and vstack atoms Add Python C extension bindings for four new SparseDiffEngine atoms: - diag_mat: extract diagonal from square matrix - upper_tri: extract strict upper triangular elements - kron_left: Kronecker product kron(C, X) with constant sparse C - vstack: vertical stack of expressions (via transpose-hstack composition) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update SparseDiffEngine submodule with main merge Merges SparseDiffEngine main into adds-more-affine-atoms branch to pick up folder restructuring and parameter support while preserving diag_mat, upper_tri, and vstack atoms. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * pin diffengine to tag --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PreviousNext