Skip to content

Commit 50ff665

Browse files
Update to enable Static.jl v0.7
1 parent 06ab5c4 commit 50ff665

11 files changed

+31
-30
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
99

1010
[compat]
1111
LoopVectorization = "0.12.108"
12-
Static = "0.4, 0.5, 0.6"
12+
Static = "0.4, 0.5, 0.6, 0.7"
1313
julia = "1.5"
1414

1515
[extras]

src/combinatorial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ A = rand(5,5,5,5);
208208
# Test case:
209209
# does the non-generated function specialize on the types in the tuple? yes.
210210
# does the generated function specialize on the types in the tuple? yes, at least in this case.
211-
function bf(dims::D) where {M, D<:Tuple{Vararg{Integer, M}}}
211+
function bf(dims::D) where {M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
212212
M + 1
213213
end
214214
d1 = (1,2,3)

src/vargminmax.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ vtargmin(f, As::Vararg{AbstractArray, P}; dims=:) where {P} =
425425
# return staticdim_argminmax_quote(OP, I, static_dims, N)
426426
# end
427427

428-
# @generated function _vargminmax!(f::F, op::OP, init::I, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₗ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
428+
# @generated function _vargminmax!(f::F, op::OP, init::I, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₗ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
429429
# branches_argminmax_quote(OP, I, N, M, D)
430430
# end
431431
# @generated function _vargminmax!(f::F, op::OP, init::I, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::Tuple{}) where {F, OP, I, Tₗ, T, N}

src/vextrema.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function branches_extrema_quote(Iₘᵢₙ, Iₘₐₓ, N::Int, M::Int, D)
216216
return staticdim_extrema_quote(Iₘᵢₙ, Iₘₐₓ, static_dims, N)
217217
end
218218

219-
@generated function _vvextrema!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
219+
@generated function _vvextrema!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
220220
branches_extrema_quote(Iₘᵢₙ, Iₘₐₓ, N, M, D)
221221
end
222222

@@ -395,7 +395,7 @@ function branches_extrema_init_quote(N::Int, M::Int, D)
395395
end
396396

397397

398-
@generated function _vvextrema_init!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
398+
@generated function _vvextrema_init!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
399399
branches_extrema_init_quote(N, M, D)
400400
end
401401

@@ -632,7 +632,7 @@ function branches_textrema_quote(Iₘᵢₙ, Iₘₐₓ, N::Int, M::Int, D)
632632
return staticdim_textrema_quote(Iₘᵢₙ, Iₘₐₓ, static_dims, N)
633633
end
634634

635-
@generated function _vtextrema!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
635+
@generated function _vtextrema!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
636636
branches_textrema_quote(Iₘᵢₙ, Iₘₐₓ, N, M, D)
637637
end
638638

@@ -811,7 +811,7 @@ function branches_textrema_init_quote(N::Int, M::Int, D)
811811
end
812812

813813

814-
@generated function _vtextrema_init!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
814+
@generated function _vtextrema_init!(f::F, initmin::Iₘᵢₙ, initmax::Iₘₐₓ, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, Iₘᵢₙ, Iₘₐₓ, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
815815
branches_textrema_init_quote(N, M, D)
816816
end
817817

src/vfindminmax.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ function branches_findminmax_quote(OP, I, N::Int, M::Int, D)
361361
return staticdim_findminmax_quote(OP, I, static_dims, N)
362362
end
363363

364-
@generated function _vfindminmax!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, Tₗ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
364+
@generated function _vfindminmax!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, Tₗ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
365365
branches_findminmax_quote(OP, I, N, M, D)
366366
end
367367

@@ -707,7 +707,7 @@ function branches_tfindminmax_quote(OP, I, N::Int, M::Int, D)
707707
return staticdim_tfindminmax_quote(OP, I, static_dims, N)
708708
end
709709

710-
@generated function _vtfindminmax!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, Tₗ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
710+
@generated function _vtfindminmax!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, Tₗ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
711711
branches_tfindminmax_quote(OP, I, N, M, D)
712712
end
713713
@generated function _vtfindminmax!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, A::AbstractArray{T, N}, dims::Tuple{}) where {F, OP, I, Tₒ, Tₗ, T, N}

src/vfindminmax_vararg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ function branches_findminmax_vararg_quote(OP, I, N::Int, M::Int, P::Int, D)
319319
return staticdim_findminmax_vararg_quote(OP, I, static_dims, N, P)
320320
end
321321

322-
@generated function _vfindminmax_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, Tₗ, N, P, M, D<:Tuple{Vararg{Integer, M}}}
322+
@generated function _vfindminmax_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, Tₗ, N, P, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
323323
branches_findminmax_vararg_quote(OP, I, N, M, P, D)
324324
end
325325
# In the case of rinds = ∅, this just corresponds to a map
@@ -630,7 +630,7 @@ function branches_tfindminmax_vararg_quote(OP, I, N::Int, M::Int, P::Int, D)
630630
return staticdim_tfindminmax_vararg_quote(OP, I, static_dims, N, P)
631631
end
632632

633-
@generated function _vtfindminmax_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, Tₗ, N, P, M, D<:Tuple{Vararg{Integer, M}}}
633+
@generated function _vtfindminmax_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, C::AbstractArray{Tₗ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, Tₗ, N, P, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
634634
branches_tfindminmax_vararg_quote(OP, I, N, M, P, D)
635635
end
636636
# In the case of rinds = ∅, this just corresponds to a map

src/vlogsoftmax.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function branches_logsoftmax_quote(N::Int, M::Int, D)
160160
return staticdim_logsoftmax_quote(static_dims, N)
161161
end
162162

163-
@generated function _vlogsoftmax!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::D) where {Tₒ, T, Tₘ, N, M, D<:Tuple{Vararg{Integer, M}}}
163+
@generated function _vlogsoftmax!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::D) where {Tₒ, T, Tₘ, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
164164
branches_logsoftmax_quote(N, M, D)
165165
end
166166
@generated function _vlogsoftmax!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::Tuple{}) where {Tₒ, T, Tₘ, N}
@@ -323,7 +323,7 @@ function branches_tlogsoftmax_quote(N::Int, M::Int, D)
323323
return staticdim_tlogsoftmax_quote(static_dims, N)
324324
end
325325

326-
@generated function _vtlogsoftmax!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::D) where {Tₒ, T, Tₘ, N, M, D<:Tuple{Vararg{Integer, M}}}
326+
@generated function _vtlogsoftmax!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::D) where {Tₒ, T, Tₘ, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
327327
branches_tlogsoftmax_quote(N, M, D)
328328
end
329329
@generated function _vtlogsoftmax!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::Tuple{}) where {Tₒ, T, Tₘ, N}

src/vlogsumexp.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function branches_logsumexp_quote(N::Int, M::Int, D)
189189
return staticdim_logsumexp_quote(static_dims, N)
190190
end
191191

192-
@generated function _vlogsumexp!(B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
192+
@generated function _vlogsumexp!(B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
193193
branches_logsumexp_quote(N, M, D)
194194
end
195195
@generated function _vlogsumexp!(B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::Tuple{}) where {Tₒ, T, N}
@@ -332,7 +332,7 @@ end
332332
# return staticdim_logsumexp2_quote(static_dims, N)
333333
# end
334334

335-
# @generated function _vlogsumexp2!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::D) where {Tₒ, T, Tₘ, N, M, D<:Tuple{Vararg{Integer, M}}}
335+
# @generated function _vlogsumexp2!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::D) where {Tₒ, T, Tₘ, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
336336
# branches_logsumexp2_quote(N, M, D)
337337
# end
338338
# @generated function _vlogsumexp2!(C::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, B::AbstractArray{Tₘ, N}, dims::Tuple{}) where {Tₒ, T, Tₘ, N}
@@ -522,7 +522,7 @@ function branches_tlogsumexp_quote(N::Int, M::Int, D)
522522
return staticdim_tlogsumexp_quote(static_dims, N)
523523
end
524524

525-
@generated function _vtlogsumexp!(B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
525+
@generated function _vtlogsumexp!(B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
526526
branches_tlogsumexp_quote(N, M, D)
527527
end
528528
@generated function _vtlogsumexp!(B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::Tuple{}) where {Tₒ, T, N}

src/vmapreduce.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# - Using compile-time branch resolution rather than dispatch system (well,
99
# less on the dispatch system)
1010
_dim(::Type{StaticInt{N}}) where {N} = N::Int
11+
const IntOrStaticInt = Union{Integer, StaticInt}
1112
# Stable return type version, otherwise it's just a suggestion
1213
# _dim(::Type{StaticInt{N}})::Int where {N} = N
1314

@@ -363,7 +364,7 @@ function branches_mapreduce_quote(OP, I, N::Int, M::Int, D)
363364
return staticdim_mapreduce_quote(OP, I, static_dims, N)
364365
end
365366

366-
@generated function _vvmapreduce!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
367+
@generated function _vvmapreduce!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
367368
branches_mapreduce_quote(OP, I, N, M, D)
368369
end
369370

@@ -537,7 +538,7 @@ function branches_mapreduce_init_quote(OP, N::Int, M::Int, D)
537538
return staticdim_mapreduce_init_quote(OP, static_dims, N)
538539
end
539540

540-
@generated function _vvmapreduce_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
541+
@generated function _vvmapreduce_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
541542
branches_mapreduce_init_quote(OP, N, M, D)
542543
end
543544
@generated function _vvmapreduce_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::Tuple{}) where {F, OP, I, Tₒ, T, N}
@@ -873,7 +874,7 @@ function branches_tmapreduce_quote(OP, I, N::Int, M::Int, D)
873874
return staticdim_tmapreduce_quote(OP, I, static_dims, N)
874875
end
875876

876-
@generated function _vtmapreduce!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
877+
@generated function _vtmapreduce!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
877878
branches_tmapreduce_quote(OP, I, N, M, D)
878879
end
879880

@@ -1041,7 +1042,7 @@ function branches_tmapreduce_init_quote(OP, N::Int, M::Int, D)
10411042
return staticdim_tmapreduce_init_quote(OP, static_dims, N)
10421043
end
10431044

1044-
@generated function _vtmapreduce_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{Integer, M}}}
1045+
@generated function _vtmapreduce_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::D) where {F, OP, I, Tₒ, T, N, M, D<:Tuple{Vararg{IntOrStaticInt, M}}}
10451046
branches_tmapreduce_init_quote(OP, N, M, D)
10461047
end
10471048
@generated function _vtmapreduce_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, A::AbstractArray{T, N}, dims::Tuple{}) where {F, OP, I, Tₒ, T, N}

src/vmapreduce_vararg.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ function map_vararg_quote(P::Int)
249249
end
250250
end
251251

252-
# @generated function _vvmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{Integer, M}}}
252+
# @generated function _vvmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
253253
# branches_mapreduce_vararg_quote(OP, I, N, M, P, D)
254254
# end
255255

@@ -259,7 +259,7 @@ end
259259
# end
260260

261261
# Versions which cover arrays with different element types
262-
@generated function _vvmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{Integer, M}}}
262+
@generated function _vvmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
263263
branches_mapreduce_vararg_quote(OP, I, N, M, P, D)
264264
end
265265

@@ -465,15 +465,15 @@ function branches_mapreduce_vararg_init_quote(OP, N::Int, M::Int, P::Int, D)
465465
return staticdim_mapreduce_vararg_init_quote(OP, static_dims, N, P)
466466
end
467467

468-
# @generated function _vvmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{Integer, M}}}
468+
# @generated function _vvmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
469469
# branches_mapreduce_vararg_init_quote(OP, N, M, P, D)
470470
# end
471471
# @generated function _vvmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::Tuple{}) where {F, OP, I, Tₒ, T, N, S<:AbstractArray{T, N}, P}
472472
# map_vararg_quote(P)
473473
# end
474474

475475
# Versions which cover arrays with different element types
476-
@generated function _vvmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{Integer, M}}}
476+
@generated function _vvmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
477477
branches_mapreduce_vararg_init_quote(OP, N, M, P, D)
478478
end
479479

@@ -747,7 +747,7 @@ function tmap_vararg_quote(P::Int)
747747
end
748748
end
749749

750-
# @generated function _vtmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{Integer, M}}}
750+
# @generated function _vtmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
751751
# branches_tmapreduce_vararg_quote(OP, I, N, M, P, D)
752752
# end
753753

@@ -757,7 +757,7 @@ end
757757
# end
758758

759759
# Versions which cover arrays with different element types
760-
@generated function _vtmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{Integer, M}}}
760+
@generated function _vtmapreduce_vararg!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
761761
branches_tmapreduce_vararg_quote(OP, I, N, M, P, D)
762762
end
763763

@@ -958,15 +958,15 @@ function branches_tmapreduce_vararg_init_quote(OP, N::Int, M::Int, P::Int, D)
958958
return staticdim_tmapreduce_vararg_init_quote(OP, static_dims, N, P)
959959
end
960960

961-
# @generated function _vtmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{Integer, M}}}
961+
# @generated function _vtmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::D) where {F, OP, I, Tₒ, T, N, M, S<:AbstractArray{T, N}, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
962962
# branches_tmapreduce_vararg_init_quote(OP, N, M, P, D)
963963
# end
964964
# @generated function _vtmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{S, P}}, dims::Tuple{}) where {F, OP, I, Tₒ, T, N, S<:AbstractArray{T, N}, P}
965965
# tmap_vararg_quote(P)
966966
# end
967967

968968
# Versions which cover arrays with different element types
969-
@generated function _vtmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{Integer, M}}}
969+
@generated function _vtmapreduce_vararg_init!(f::F, op::OP, init::I, B::AbstractArray{Tₒ, N}, As::Tuple{Vararg{AbstractArray, P}}, dims::D) where {F, OP, I, Tₒ, N, M, P, D<:Tuple{Vararg{IntOrStaticInt, M}}}
970970
branches_tmapreduce_vararg_init_quote(OP, N, M, P, D)
971971
end
972972

0 commit comments

Comments
 (0)