Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ It is seamless from the user perspective and fixed many bugs.
14. Various Spack updates.

15. Added examples/sysGmres.cpp to demonstrate how to use SystemSolver with GMRES.

16. Updated MatrixHandler::addConst to return integer error codes instead of void.
7 changes: 4 additions & 3 deletions resolve/matrix/MatrixHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,19 @@ namespace ReSolve
* @param[in] memspace - Device where the operation is computed
* @return 0 if successful, 1 otherwise
*/
void MatrixHandler::addConst(matrix::Sparse* A, real_type alpha, memory::MemorySpace memspace)
int MatrixHandler::addConst(matrix::Sparse* A, real_type alpha, memory::MemorySpace memspace)
{
using namespace ReSolve::memory;
switch (memspace)
{
case HOST:
cpuImpl_->addConst(A, alpha);
return cpuImpl_->addConst(A, alpha);
break;
case DEVICE:
devImpl_->addConst(A, alpha);
return devImpl_->addConst(A, alpha);
break;
}
return 1;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion resolve/matrix/MatrixHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace ReSolve

int rightScale(matrix::Csr* A, vector_type* diag, memory::MemorySpace memspace);

void addConst(matrix::Sparse* A, real_type alpha, memory::MemorySpace memspace);
int addConst(matrix::Sparse* A, real_type alpha, memory::MemorySpace memspace);

/// Should compute vec_result := alpha*A*vec_x + beta*vec_result, but at least on cpu alpha and beta are flipped
int matvec(matrix::Sparse* A,
Expand Down
Loading