Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Aug 19, 2024
1 parent 49c4203 commit ddb7727
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/NLopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -800,16 +800,6 @@ function optimize(o::Opt, x::AbstractVector{<:Real})
return optimize!(o, copyto!(Array{Cdouble}(undef, length(x)), x))
end

@static if !isdefined(Base, :get_extension)
include("../ext/NLoptMathOptInterfaceExt.jl")
using .NLoptMathOptInterfaceExt
const Optimizer = NLoptMathOptInterfaceExt.Optimizer
else
# declare this upfront so that the MathOptInterface extension can assign it
# without creating a new global
global Optimizer
end

export Opt,
NLOPT_VERSION,
algorithm,
Expand Down Expand Up @@ -853,4 +843,14 @@ export Opt,
Algorithm,
Result

@static if !isdefined(Base, :get_extension)
include("../ext/NLoptMathOptInterfaceExt.jl")
using .NLoptMathOptInterfaceExt
const Optimizer = NLoptMathOptInterfaceExt.Optimizer
else
# declare this upfront so that the MathOptInterface extension can assign it
# without creating a new global
global Optimizer
end

end # module

0 comments on commit ddb7727

Please sign in to comment.