Skip to content

Commit

Permalink
apparently type inference doesn't like the broadcast macro thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn de Vos committed Nov 16, 2023
1 parent 7783066 commit fbba739
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dense/generic_dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ Herimte Interpolation, chosen if no other dispatch for ode_interpolant
@muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{false}}, idxs::Nothing,
T::Type{Val{0}}, dv=1) # Default interpolant is Hermite
#@.. broadcast=false (1-Θ)*y₀+Θ*y₁+Θ*(Θ-1)*((1-2Θ)*(y₁-y₀)+(Θ-1)*dt*k[1] + Θ*dt*k[2])
@inbounds @.. (1 - Θ) * y₀ + Θ * y₁ +
dv * Θ *- 1) * ((1 - 2Θ) * (y₁ - y₀) +- 1) * dt * k[1] + Θ * dt * k[2])
@inbounds (1 - Θ) * y₀ + Θ * y₁ +
dv .* (Θ *- 1) * ((1 - 2Θ) * (y₁ - y₀) +- 1) * dt * k[1] + Θ * dt * k[2]))
end

@muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{true}}, idxs::Nothing,
Expand All @@ -664,10 +664,10 @@ end

@muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, cache, idxs, T::Type{Val{0}}, dv=1) # Default interpolant is Hermite
# return @.. broadcast=false (1-Θ)*y₀[idxs]+Θ*y₁[idxs]+Θ*(Θ-1)*((1-2Θ)*(y₁[idxs]-y₀[idxs])+(Θ-1)*dt*k[1][idxs] + Θ*dt*k[2][idxs])
return @.. (1 - Θ) * y₀[idxs] + Θ * y₁[idxs] +
dv * Θ *- 1) *
return (1 - Θ) * y₀[idxs] + Θ * y₁[idxs] +
dv .* (Θ *- 1) *
((1 - 2Θ) * (y₁[idxs] - y₀[idxs]) +- 1) * dt * k[1][idxs] +
Θ * dt * k[2][idxs])
Θ * dt * k[2][idxs]))
end

@muladd function hermite_interpolant!(out, Θ, dt, y₀, y₁, k, idxs::Nothing, T::Type{Val{0}}, dv=1) # Default interpolant is Hermite
Expand Down

0 comments on commit fbba739

Please sign in to comment.