Skip to content

Commit ae85f2e

Browse files
committed
Work around SciML bug.
1 parent dab7f8a commit ae85f2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/compiler/compilation.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,10 @@ end
393393
end
394394

395395
# device-side call to an opaque closure
396-
function (oc::OpaqueClosure{F,E,A,R})(args...) where {F,E,A,R}
396+
(oc::OpaqueClosure)(args...) = call(oc, args...)
397+
## NOTE: split into two to make `SciML.isinplace(oc)` work.
398+
## it also resembles how kernels are called.
399+
@inline function call(oc::OpaqueClosure{F,E,A,R}, args...) where {F,E,A,R}
397400
ptr = ccall("extern deferred_codegen", llvmcall, Ptr{Cvoid}, (Int,), F)
398401
assume(ptr != C_NULL)
399402
#ccall(ptr, R, (A...), args...)

0 commit comments

Comments
 (0)