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 Apr 14, 2023
1 parent dab7f8a commit ae85f2e
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 @@ -393,7 +393,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 ae85f2e

Please sign in to comment.