Skip to content

Commit

Permalink
remove unbound type parameter (#147)
Browse files Browse the repository at this point in the history
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
  • Loading branch information
nsajko authored Nov 21, 2022
1 parent c71b7a3 commit 29fed5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objective_types/incomplete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ end
const InPlaceFGH = InplaceObjective{<:Nothing,<:Nothing,TH,<:Nothing,<:Nothing} where {TH}
const InPlaceFG_HV = InplaceObjective{<:Nothing,TFG,<:Nothing,THv,<:Nothing} where {TFG,THv}
const InPlaceFGHV = InplaceObjective{<:Nothing,<:Nothing,<:Nothing,<:Nothing,TFGHv} where {TFGHv}
function TwiceDifferentiable(t::InPlaceFGH, x::AbstractArray, F::Real = real(zero(eltype(x))), G::AbstractArray = alloc_DF(x, F), H = alloc_H(x, F)) where {TH}
function TwiceDifferentiable(t::InPlaceFGH, x::AbstractArray, F::Real = real(zero(eltype(x))), G::AbstractArray = alloc_DF(x, F), H = alloc_H(x, F))
f = x -> t.fgh(F, nothing, nothing, x)
df = (G, x) -> t.fgh(nothing, G, nothing, x)
fdf = (G, x) -> t.fgh(F, G, nothing, x)
Expand Down

0 comments on commit 29fed5a

Please sign in to comment.