Implement A := c*A+B method in `MatrixHandler`
@quantumsteve is already working on this.
Since Nov 12, 2025.
- Dominant language
- C++
- Stars
- 84
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Implement following operation in MatrixHandler class for all three suported hardware backends:
- $A := cA + I$ - Multiply all matrix element by a constant and add identity matrix to it.
- $A := cA + B$ - Multiply all matrix element by a constant and add another matrix to it.
Rationale
These methods are needed for interfacing with SUNDIALS, which requires matrix objects to implement following methods
Description
Add methods to the existing MatrixHandler implementations. Test on CPU, CUDA and HIP backends. Add unit tests to the MatrixHandlerTests class.
Additional information
Please keep in mind that this operation will be called repeatedly for matrices with the same sparsity pattern. Make sure the analysis part to compute the sparsity pattern of the resulting matrix is done once and available for reuse whenever the same operation is called.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.