housekeeping (sparse): split spmv kernels into submodules#1180
housekeeping (sparse): split spmv kernels into submodules#1180jalvesz wants to merge 28 commits intofortran-lang:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors the sparse SPMV implementation by splitting format-specific kernels (COO/CSR/CSC/ELL/SELLC) out of the monolithic stdlib_sparse_spmv module into separate submodules, enabling easier isolated development per storage format.
Changes:
- Introduced new
stdlib_sparse_spmv_*submodules implementing format-specific SPMV kernels. - Updated
stdlib_sparse_spmvto expose interface-onlymodule subroutinedeclarations for submodule implementations. - Updated build configuration and sparse spec documentation to reflect the new structure.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/sparse/stdlib_sparse_spmv_sellc.fypp | Adds SELLC SPMV implementation as a submodule with chunked kernels. |
| src/sparse/stdlib_sparse_spmv_ell.fypp | Adds ELL SPMV implementation as a submodule (rank-1 and rank-2 variants). |
| src/sparse/stdlib_sparse_spmv_csr.fypp | Adds CSR SPMV implementation as a submodule (rank-1 and rank-2 variants). |
| src/sparse/stdlib_sparse_spmv_csc.fypp | Adds CSC SPMV implementation as a submodule (rank-1 and rank-2 variants). |
| src/sparse/stdlib_sparse_spmv_coo.fypp | Adds COO SPMV implementation as a submodule (rank-1 and rank-2 variants). |
| src/sparse/stdlib_sparse_spmv.fypp | Replaces in-module implementations with interface declarations for submodules. |
| src/sparse/stdlib_sparse_kinds.fypp | Removes trailing whitespace. |
| src/sparse/CMakeLists.txt | Registers the new submodule fypp sources in the sparse build. |
| doc/specs/stdlib_sparse.md | Clarifies add usage by splitting single-value vs block-value syntax. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if( .not.any( ${CHUNKS}$ == cs ) ) then | ||
| print *, "error: sellc chunk size not supported." | ||
| return | ||
| end if |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1180 +/- ##
==========================================
+ Coverage 68.81% 68.83% +0.01%
==========================================
Files 408 408
Lines 13726 13726
Branches 1552 1552
==========================================
+ Hits 9446 9448 +2
+ Misses 4280 4278 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This PR splits the sparse spmv module into submodules for easier breakdown when working on individual formats.