From 03c57b14df71c0419b5b83f10214cd7ea70a289e Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Sat, 9 Nov 2024 12:15:10 +0100 Subject: [PATCH] bump fix from htool and add clear_data to virtual lrmat generator --- lib/htool | 2 +- .../hmatrix/interfaces/virtual_low_rank_generator.hpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/htool b/lib/htool index a28e0f2..3148e0f 160000 --- a/lib/htool +++ b/lib/htool @@ -1 +1 @@ -Subproject commit a28e0f215ef66744c716de185e2db983c8d14237 +Subproject commit 3148e0f3c6cb9ff04b42cc1ea7f52b9a25d2cf63 diff --git a/src/htool/hmatrix/interfaces/virtual_low_rank_generator.hpp b/src/htool/hmatrix/interfaces/virtual_low_rank_generator.hpp index c87cb21..ee777eb 100644 --- a/src/htool/hmatrix/interfaces/virtual_low_rank_generator.hpp +++ b/src/htool/hmatrix/interfaces/virtual_low_rank_generator.hpp @@ -40,8 +40,6 @@ class VirtualLowRankGeneratorPython : public VirtualLowRankGenerator &rows, const py::array_t &cols, underlying_type epsilon) const = 0; // LCOV_EXCL_LINE @@ -49,6 +47,11 @@ class VirtualLowRankGeneratorPython : public VirtualLowRankGenerator V0) { m_mats_V.push_back(V0); } + + void clear_data(){ + m_mats_U.clear(); + m_mats_V.clear(); + } }; template @@ -76,6 +79,7 @@ void declare_custom_VirtualLowRankGenerator(py::module &m, const std::string &cl py_class.def("build_low_rank_approximation", &Class::build_low_rank_approximation); py_class.def("set_U", &Class::set_U); py_class.def("set_V", &Class::set_V); + py_class.def("clear_data", &Class::clear_data); } #endif