From b9b24ab0398f01269282d81ce7a2bfa1929e18cc Mon Sep 17 00:00:00 2001 From: "Hugo U. R. Strand" Date: Tue, 3 Nov 2026 14:14:51 +0100 Subject: [PATCH] [imtime] reuse Hilbert transforms in convolution --- c++/cppdlr/dlr_imtime.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/c++/cppdlr/dlr_imtime.hpp b/c++/cppdlr/dlr_imtime.hpp index 29884c8..d0989b9 100644 --- a/c++/cppdlr/dlr_imtime.hpp +++ b/c++/cppdlr/dlr_imtime.hpp @@ -343,8 +343,10 @@ namespace cppdlr { auto h = arraymult(tcf2it_v, tmp); // Off-diagonal contribution + auto hfc = arraymult(hilb_v, fc); + auto hgc = arraymult(hilb_v, gc); for (int i = 0; i < r; ++i) { - tmp(i, _, _) = matmul(arraymult(hilb_v, fc)(i, _, _), gc(i, _, _)) + matmul(fc(i, _, _), arraymult(hilb_v, gc)(i, _, _)); + tmp(i, _, _) = matmul(hfc(i, _, _), gc(i, _, _)) + matmul(fc(i, _, _), hgc(i, _, _)); } return beta * (h + arraymult(cf2it, tmp));