Skip to content

Commit

Permalink
Fix 32bit overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pghysels committed Oct 5, 2024
1 parent 014c8d2 commit d2a1410
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/sparse/fronts/FrontBLR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ namespace strumpack {
A.extract_front
(F11, F12, F21, sep_begin_, sep_end_, this->upd_, task_depth);
if (dupd) {
CBstorage_ = workspace.get(dupd*dupd);
CBstorage_ = workspace.get(std::size_t(dupd)*dupd);
F22_ = DenseMW_t(dupd, dupd, CBstorage_.data(), dupd);
F22_.zero();
}
Expand Down
7 changes: 1 addition & 6 deletions src/sparse/fronts/FrontDense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,7 @@ namespace strumpack {
(F11_, F12_, F21_, this->sep_begin_, this->sep_end_,
this->upd_, task_depth);
if (dupd) {
CBstorage_ = workspace.get();
integer_t old_size = CBstorage_.size();
if (dupd*dupd > old_size) {
STRUMPACK_ADD_MEMORY((dupd*dupd - old_size)*sizeof(scalar_t));
}
CBstorage_.resize(dupd*dupd);
CBstorage_ = workspace.get(std::size_t(dupd)*dupd);
F22_ = DenseMW_t(dupd, dupd, CBstorage_.data(), dupd);
F22_.zero();
}
Expand Down

0 comments on commit d2a1410

Please sign in to comment.