Skip to content

Commit 9cfd249

Browse files
committed
Work around SciML bug.
1 parent 26553a4 commit 9cfd249

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
@@ -406,7 +406,10 @@ end
406406
end
407407

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

0 commit comments

Comments
 (0)