Skip to content

Commit 6a79a53

Browse files
committed
Work around SciML bug.
1 parent 514c506 commit 6a79a53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiler/compilation.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,10 @@ end
570570
end
571571

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

0 commit comments

Comments
 (0)