Skip to content

Add new mdspan overlays and use them in examples and tests#64

Merged
spencerpatty merged 4 commits intomainfrom
dev_mdspan_overlays
Mar 26, 2026
Merged

Add new mdspan overlays and use them in examples and tests#64
spencerpatty merged 4 commits intomainfrom
dev_mdspan_overlays

Conversation

@Baerenwalder
Copy link
Copy Markdown
Contributor

Summary:
When using md::mdspan, row-major layout is the default. However, MATLAB only supports column-major layout. Hence, I create 2 overlays mdspan_col_major and mdspan_row_major to simplify this.

Details:
modified: include/spblas/detail/mdspan.hpp

  • create new overlays that live in namespace spblas

modified: test/gtest/CMakeLists.txt
new file: test/gtest/mdspan_overlays.cpp

  • add positive and negative unit tests to check overlays work as expected

modified: examples/matrix_opt_example.cpp
modified: examples/simple_spmm.cpp
modified: examples/spmm_csc.cpp
modified: test/gtest/conjugate_test.cpp
modified: test/gtest/spmm_test.cpp

  • make use of new overlays in all examples and tests that used md::mdspan previously

Merge Checklist:

  • Passing CI
  • Update documentation or README.md
  • Additional Test/example added (if applicable) and passing
  • At least one reviewer approval
  • (optional) Clang sanitizer scan run and triaged
  • Clang formatter applied (verified as part of passing CI)

@Baerenwalder Baerenwalder self-assigned this Mar 25, 2026
@Baerenwalder Baerenwalder added the enhancement New feature or request label Mar 25, 2026
Copy link
Copy Markdown

@srobertp srobertp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Approved

Copy link
Copy Markdown
Contributor

@spencerpatty spencerpatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved from my other git

@spencerpatty spencerpatty merged commit aa63f45 into main Mar 26, 2026
9 of 12 checks passed
@spencerpatty spencerpatty deleted the dev_mdspan_overlays branch March 26, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants