Skip to content

Commit

Permalink
ECKIT-625 SparseMatrix increased range of non-zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaciel committed Sep 5, 2024
1 parent 99f79cf commit b5bc81c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/eckit/linalg/SparseMatrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ SparseMatrix::SparseMatrix(Size rows, Size cols, const std::vector<Triplet>& tri
if (auto max = static_cast<Size>(std::numeric_limits<UIndex>::max()); max < nnz) {
throw OutOfRange("SparseMatrix::SparseMatrix: too many non-zero entries, nnz=" + std::to_string(nnz)
+ ", max=" + std::to_string(max),
Here());
Here());
}

reserve(rows, cols, nnz);
Expand Down Expand Up @@ -209,7 +209,9 @@ SparseMatrix::~SparseMatrix() {


void SparseMatrix::reset() {
owner_->deallocate(spm_, shape_);
if (owner_) {
owner_->deallocate(spm_, shape_);
}

spm_.reset();
shape_.reset();
Expand Down

0 comments on commit b5bc81c

Please sign in to comment.