Skip to content

Commit

Permalink
fix the init of workspaces (#678)
Browse files Browse the repository at this point in the history
* fixed bug when padding wasn't done with zeros
  • Loading branch information
mkstoyanov authored Apr 19, 2024
1 parent 824460e commit 025f2b9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/asgard_kronmult_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,12 +954,10 @@ class global_kron_matrix
"no buffer associated with the last entry (num_spaces)");
default_vector<precision> &w = (*work_)[static_cast<int>(wid)];
if (static_cast<int64_t>(w.size()) < min_size)
{
w.resize(min_size);
// x must always be padded by zeros
if constexpr (wid == workspace::pad_x)
kronmult::set_buffer_to_zero(w);
}
// x must always be padded by zeros
if constexpr (wid == workspace::pad_x)
kronmult::set_buffer_to_zero(w);
}

private:
Expand Down

0 comments on commit 025f2b9

Please sign in to comment.