Skip to content

Add fixed order general matrix_view#71

Open
yhmtsai wants to merge 2 commits intomainfrom
dev/yhmtsai/tag_view
Open

Add fixed order general matrix_view#71
yhmtsai wants to merge 2 commits intomainfrom
dev/yhmtsai/tag_view

Conversation

@yhmtsai
Copy link
Copy Markdown
Contributor

@yhmtsai yhmtsai commented Apr 8, 2026

Summary:
Traditional vendor APIs require a specific ordering to describe how operations are applied. In std::linalg, the triangular solve descriptor is applied on top of op(A), which is not fully intuitive.

To improve usability, we choose not to expose the triangular descriptor as an explicit argument. Instead, users can define the operation directly in terms of the mathematical equation, without needing to translate it into the API’s required ordering.

This PR bridges the gap between the user-defined expression and the ordering expected by the underlying API.

Details:

  • When construct the view, it will translate to specific order already, which can be used to detect in compile time.

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)

@yhmtsai yhmtsai changed the title Add fixed_older tagged view Add fixed order general matrix_view Apr 10, 2026
@yhmtsai yhmtsai requested a review from spencerpatty April 10, 2026 11:00
@yhmtsai yhmtsai marked this pull request as ready for review April 10, 2026 11:00
Comment on lines +76 to +77
template <typename matrix_opt, typename Conjugate = std::false_type,
typename Transpose = std::false_type,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was using none, conj, trans specific type in previous commit.
The current one use std::false_type for none and std::true_type for conj and trans.

typename Transpose = std::false_type,
diag::diag Diagonal = diag::explicit_diag,
uplo::uplo UpLo = uplo::full>
class general : public spblas::view_base {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

other good name for that?
fixed_order, vendor, legacy, blas-like?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like something like "legacy_pattern" or "blas_pattern"

@yhmtsai yhmtsai force-pushed the dev/yhmtsai/tag_view branch from 4dd3f0c to 3a29cbf Compare April 16, 2026 12:32
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.

2 participants