-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #18577, remove generated function broadcast_tup
#18580
Conversation
918bf5c
to
a345db2
Compare
This seems to work: @generated function broadcast_tup{AT,nargs,n}(f, As::AT, ::Type{Val{nargs}}, ::Type{Val{n}})
Expr(:tuple, (Expr(:call, :f, (:(_broadcast_getindex(As[$i], $k)) for i=1:nargs)...) for k=1:n)...)
end along with a changed call from |
IIUC, |
51dc53d
to
e4eafbc
Compare
@martinholters I updated with your version for now until we find a valid, inferrable and more efficient way of fixing this. By the way, at one moment I had |
@vtjnash Do you have a better suggestion for fixing this? |
The non-generated version is also probably much more efficient: function broadcast_tup(f, As, n)
return (f((_broadcast_getindex(A, k) for A in As)...) for k = 1:n)...)
end |
e4eafbc
to
fff39b7
Compare
broadcast_tup
generated functionbroadcast_tup
Removing the generated function seems the best option as this case wasn't inferable anyway (PR already updated accordingly). |
No description provided.