We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c20366 commit 47f9a9fCopy full SHA for 47f9a9f
1 file changed
test/test_allocs.jl
@@ -33,6 +33,7 @@ macro wrappedallocs(expr)
33
kwargs_dict = Dict{Symbol, Any}(a.args[1] => a.args[2] for a in kwargs if a.head == :kw)
34
quote
35
function g($(argnames...); kwargs_dict...)
36
+ $(Expr(expr.head, argnames..., kwargs...)) # Call the function twice to make the allocated macro more stable
37
@allocated $(Expr(expr.head, argnames..., kwargs...))
38
end
39
$(Expr(:call, :g, [esc(a) for a in args]...))
0 commit comments