Skip to content

Commit

Permalink
Fix in-place broadcast fusion in evalrule (#121)
Browse files Browse the repository at this point in the history
and use unpacked names for fg and fk
  • Loading branch information
danielwe authored Sep 18, 2024
1 parent ce727e1 commit 8eaf0f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/evalrule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8eaf0f0

Please sign in to comment.