Skip to content

Implement A := c*A+B method in MatrixHandler #393

@pelesh

Description

@pelesh

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions