Skip to content

Commit 92632e9

Browse files
committed
Work around SciML bug.
1 parent 4b62e16 commit 92632e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiler/compilation.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ end
402402
end
403403

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

0 commit comments

Comments
 (0)