Skip to content

Commit e96a466

Browse files
fix oop pass through
1 parent d5a356f commit e96a466

File tree

2 files changed

+4
-31
lines changed

2 files changed

+4
-31
lines changed

src/norecompile.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ end
2525
function wrapfun_iip(ff, inputs)
2626
FunctionWrappersWrappers.FunctionWrappers.FunctionWrapper{Nothing, typeof(inputs)}(Void(ff))
2727
end
28+
29+
function wrapfun_oop(ff, inputs)
30+
FunctionWrappersWrappers.FunctionWrappers.FunctionWrapper{typeof(inputs[1]), typeof(inputs)}(ff)
31+
end

src/utils.jl

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,6 @@ macro tight_loop_macros(ex)
1515
:($(esc(ex)))
1616
end
1717

18-
const oop_arglists = (Tuple{Vector{Float64}, Vector{Float64}, Float64},
19-
Tuple{Vector{Float64}, SciMLBase.NullParameters, Float64})
20-
21-
const NORECOMPILE_OOP_SUPPORTED_ARGS = (Tuple{Vector{Float64},
22-
Vector{Float64}, Float64},
23-
Tuple{Vector{Float64},
24-
SciMLBase.NullParameters, Float64})
25-
const oop_returnlists = (Vector{Float64}, Vector{Float64})
26-
27-
function wrapfun_oop(ff, inputs = ())
28-
if !isempty(inputs)
29-
IT = Tuple{map(typeof, inputs)...}
30-
if IT NORECOMPILE_OOP_SUPPORTED_ARGS
31-
throw(NoRecompileArgumentError(IT))
32-
end
33-
end
34-
FunctionWrappersWrappers.FunctionWrappersWrapper(ff, oop_arglists,
35-
oop_returnlists)
36-
end
37-
38-
function wrapfun_iip(ff, inputs)
39-
T = eltype(inputs[2])
40-
iip_arglists = (Tuple{T1, T2, T3, T4},)
41-
iip_returnlists = ntuple(x -> Nothing, 1)
42-
43-
fwt = map(iip_arglists, iip_returnlists) do A, R
44-
FunctionWrappersWrappers.FunctionWrappers.FunctionWrapper{R, A}(Void(ff))
45-
end
46-
FunctionWrappersWrappers.FunctionWrappersWrapper{typeof(fwt), false}(fwt)
47-
end
48-
4918
# TODO: would be good to have dtmin a function of dt
5019
function prob2dtmin(prob; use_end_time = true)
5120
prob2dtmin(prob.tspan, oneunit(eltype(prob.tspan)), use_end_time)

0 commit comments

Comments
 (0)