Skip to content

Conversation

yhmtsai
Copy link
Member

@yhmtsai yhmtsai commented Oct 16, 2025

This PR to allow that user write the data from the matrix (but LinOp pointer).

We have gko::write(ostream, mtx) to write the data out if the mtx is concrete matrix type.
This PR allows as<gko::WritableToStream>(linop)->write(ostream)

We can also provide something like gko::write(ostream, linop) if it makes things easy.

Because Dense, Fft, Diagonal have WritableToMatrixData<..., int32> and WritableToMatrixData<..., int64>, I need to use virtual to contain only one copy.
Any comment or alternative suggestion?

Dispatching to WriteToMatrixData in function will lose array default output for dense and fft (or doing another dispatching again there?)

@yhmtsai yhmtsai self-assigned this Oct 16, 2025
@yhmtsai yhmtsai added the 1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. label Oct 16, 2025
@ginkgo-bot ginkgo-bot added reg:testing This is related to testing. mod:core This is related to the core module. type:matrix-format This is related to the Matrix formats labels Oct 16, 2025
@yhmtsai yhmtsai requested a review from a team October 16, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. mod:core This is related to the core module. reg:testing This is related to testing. type:matrix-format This is related to the Matrix formats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants