Skip to content

Commit 6cde412

Browse files
authored
Merge pull request #18580 from pabloferz/pz/broadcast_tup
Fix #18577, remove generated function `broadcast_tup`
2 parents 2193638 + fff39b7 commit 6cde412

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

base/broadcast.jl

+1-8
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,11 @@ end
255255

256256
@inline broadcast_t(f, T, As...) = broadcast!(f, similar(Array{T}, broadcast_indices(As...)), As...)
257257

258-
@generated function broadcast_tup{AT,nargs}(f, As::AT, ::Type{Val{nargs}}, n)
259-
quote
260-
ntuple(n -> (@ncall $nargs f i->_broadcast_getindex(As[i], n)), Val{n})
261-
end
262-
end
263-
264258
function broadcast_c(f, ::Type{Tuple}, As...)
265259
shape = broadcast_indices(As...)
266260
check_broadcast_indices(shape, As...)
267261
n = length(shape[1])
268-
nargs = length(As)
269-
return broadcast_tup(f, As, Val{nargs}, n)
262+
return ntuple(k->f((_broadcast_getindex(A, k) for A in As)...), n)
270263
end
271264
@inline broadcast_c(f, ::Type{Any}, a...) = f(a...)
272265
@inline broadcast_c(f, ::Type{Array}, As...) = broadcast_t(f, promote_eltype_op(f, As...), As...)

0 commit comments

Comments
 (0)