426
426
427
427
function outer_reduction_zero (op:: Operation , u₁u:: Bool , Umax:: Int , reduct_class:: Float64 , rs:: Expr )
428
428
reduct_zero = reduction_zero (reduct_class)
429
- Tsym = outer_reduct_init_typename (op)
429
+ # Tsym = outer_reduct_init_typename(op)
430
+ Tsym = ELTYPESYMBOL
430
431
if isvectorized (op)
431
432
if Umax == 1 || ! u₁u
432
433
if reduct_zero === :zero
@@ -614,7 +615,16 @@ function gc_preserve(ls::LoopSet, q::Expr)
614
615
q2
615
616
# Expr(:block, gcp)
616
617
end
617
-
618
+ function push_outer_reduct_types! (pt:: Expr , ls:: LoopSet , ortypdefined:: Bool )
619
+ for j ∈ ls. outer_reductions
620
+ oreducop = ls. operations[j]
621
+ if ortypdefined
622
+ push! (pt. args, typeof_expr (oreducop))
623
+ else
624
+ push! (pt. args, outer_reduct_init_typename (oreducop))
625
+ end
626
+ end
627
+ end
618
628
function determine_eltype (ls:: LoopSet , ortypdefined:: Bool ):: Union{Symbol,Expr}
619
629
narrays = length (ls. includedactualarrays)
620
630
noreduc = length (ls. outer_reductions)
@@ -637,14 +647,7 @@ function determine_eltype(ls::LoopSet, ortypdefined::Bool)::Union{Symbol,Expr}
637
647
for array ∈ ls. includedactualarrays
638
648
push! (pt. args, Expr (:call , lv (:eltype ), array))
639
649
end
640
- for j ∈ ls. outer_reductions
641
- oreducop = ls. operations[j]
642
- if ortypdefined
643
- push! (pt. args, typeof_expr (oreducop))
644
- else
645
- push! (pt. args, outer_reduct_init_typename (oreducop))
646
- end
647
- end
650
+ push_outer_reduct_types! (pt, ls, ortypdefined)
648
651
return pt
649
652
end
650
653
@inline _eltype (x) = eltype (x)
@@ -653,20 +656,21 @@ function determine_width(
653
656
ls:: LoopSet , vectorized:: Union{Symbol,Nothing}
654
657
)
655
658
vwidth_q = Expr (:call , lv (:pick_vector_width ))
656
- if ! ( vectorized === nothing )
659
+ if vectorized ≢ nothing
657
660
vloop = getloop (ls, vectorized)
658
661
if isstaticloop (vloop)
659
662
push! (vwidth_q. args, Expr (:call , Expr (:curly , :Val , length (vloop))))
660
663
end
661
664
end
662
665
# push!(vwidth_q.args, ls.T)
663
- if length (ls. includedactualarrays) < 2
664
- push! (vwidth_q. args, ELTYPESYMBOL)
665
- else
666
- for array ∈ ls. includedactualarrays
667
- push! (vwidth_q. args, Expr (:call , lv (:_eltype ), array))
668
- end
669
- end
666
+ # if length(ls.includedactualarrays) < 2
667
+ push! (vwidth_q. args, ELTYPESYMBOL)
668
+ # else
669
+ # for array ∈ ls.includedactualarrays
670
+ # push!(vwidth_q.args, Expr(:call, lv(:_eltype), array))
671
+ # end
672
+ # push_outer_reduct_types!(vwidth_q,
673
+ # end
670
674
vwidth_q
671
675
end
672
676
function init_remblock (unrolledloop:: Loop , lssm:: LoopStartStopManager , n:: Int )# u₁loop::Symbol = unrolledloop.itersymbol)
0 commit comments