From 528ac56bbd2edf6064248d9a11993b25b31809e0 Mon Sep 17 00:00:00 2001 From: Daniel Wennberg Date: Wed, 18 Sep 2024 00:01:54 -0700 Subject: [PATCH] Fix in-place broadcast fusion in evalrule and use unpacked names for fg and fk --- src/evalrule.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evalrule.jl b/src/evalrule.jl index 581fa7b..89e9bcc 100644 --- a/src/evalrule.jl +++ b/src/evalrule.jl @@ -61,9 +61,9 @@ function evalrule(f::InplaceIntegrand{F}, a,b, x,w,wg, nrm) where {F} Ig .= zero.(Ik) else # odd: don't count x==0 twice in Gauss rule Ig .= f.fx .* wg[end] - f.f!(f.fg, a + (1+x[end-1])*s) - f.f!(f.fk, a + (1-x[end-1])*s) - Ik .= f.fx .* w[end] .+ (f.fg + f.fk) .* w[end-1] + f.f!(fg, a + (1+x[end-1])*s) + f.f!(fk, a + (1-x[end-1])*s) + Ik .= f.fx .* w[end] .+ (fg .+ fk) .* w[end-1] end for i = 1:length(wg)-n1 eval2x!(fg, f, a + (1+x[2i])*s, a + (1-x[2i])*s)