Skip to content

Bug: MatrixHandler::addConst return type doesn't match documentation #395

@quantumsteve

Description

@quantumsteve

Description how to reproduce the bug

The documentation says MatrixHandler::addConst should return an int but the signature is is void.

/**
* @brief Add a constant to the nonzero values of a csr matrix.
* @param[in,out] A - Sparse matrix
* @param[in] alpha - scalar parameter
* @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)

Returning an int would be consistent with other member functions, at the same time I don't see immediately see where adding a value to each nonzero element would fail in a way that would let us return an error.

Re::Solve version

develop branch, de466b5

System and environment details

N/A

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions