From 025f2b9a8f5f962b2d8a7b57bef836855b1d3863 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:07:09 -0400 Subject: [PATCH] fix the init of workspaces (#678) * fixed bug when padding wasn't done with zeros --- src/asgard_kronmult_matrix.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/asgard_kronmult_matrix.hpp b/src/asgard_kronmult_matrix.hpp index ad1ffb18a..fa0d249f2 100644 --- a/src/asgard_kronmult_matrix.hpp +++ b/src/asgard_kronmult_matrix.hpp @@ -954,12 +954,10 @@ class global_kron_matrix "no buffer associated with the last entry (num_spaces)"); default_vector &w = (*work_)[static_cast(wid)]; if (static_cast(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: