Skip to content

Commit

Permalink
Work around SciML bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jun 15, 2023
1 parent 26553a4 commit 9cfd249
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compiler/compilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,10 @@ end
end

# device-side call to an opaque closure
function (oc::OpaqueClosure{F,E,A,R})(args...) where {F,E,A,R}
(oc::OpaqueClosure)(args...) = call(oc, args...)
## NOTE: split into two to make `SciML.isinplace(oc)` work.
## it also resembles how kernels are called.
@inline function call(oc::OpaqueClosure{F,E,A,R}, args...) where {F,E,A,R}
ptr = ccall("extern deferred_codegen", llvmcall, Ptr{Cvoid}, (Int,), F)
assume(ptr != C_NULL)
#ccall(ptr, R, (A...), args...)
Expand Down

0 comments on commit 9cfd249

Please sign in to comment.