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 9, 2024
1 parent 514c506 commit 6a79a53
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 @@ -570,7 +570,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 6a79a53

Please sign in to comment.