@@ -557,13 +557,15 @@ childdependencies(ls::LoopSet, os::OperationStruct, expand = false, offset = 0)
557
557
parents_symvec (ls, os. childdeps, expand, offset)
558
558
559
559
# parents(ls::LoopSet, u::UInt128) = loopindexoffset(ls, u, false)
560
- function parents (ls:: LoopSet , u₀:: UInt128 , u₁:: UInt128 )
560
+ function parents (ls:: LoopSet , u₀:: UInt128 , u₁:: UInt128 , u₂ :: UInt128 , u₃ :: UInt128 )
561
561
idxs = Int[]
562
+ u₃ == zero (u₃) || loopindex! (idxs, ls, u₃, 0x0010 )
563
+ u₂ == zero (u₂) || loopindex! (idxs, ls, u₂, 0x0010 )
562
564
u₁ == zero (u₁) || loopindex! (idxs, ls, u₁, 0x0010 )
563
565
loopindex! (idxs, ls, u₀, 0x0010 )
564
566
reverse! (idxs)
565
567
end
566
- parents (ls:: LoopSet , os:: OperationStruct ) = parents (ls, os. parents₀, os. parents₁)
568
+ parents (ls:: LoopSet , os:: OperationStruct ) = parents (ls, os. parents₀, os. parents₁, os . parents₂, os . parents₃ )
567
569
568
570
expandedopname (opsymbol:: Symbol , offset:: Integer ) =
569
571
Symbol (String (opsymbol) * ' #' * string (offset + 1 ) * ' #' )
@@ -669,6 +671,8 @@ function add_parents_to_op!(
669
671
op:: Operation ,
670
672
up₀:: UInt128 ,
671
673
up₁:: UInt128 ,
674
+ up₂:: UInt128 ,
675
+ up₃:: UInt128 ,
672
676
k:: Int ,
673
677
Δ:: Int ,
674
678
)
@@ -677,7 +681,7 @@ function add_parents_to_op!(
677
681
offsets = ls. operation_offsets
678
682
if isone (Δ) # not expanded
679
683
@assert isone (k)
680
- for i ∈ parents (ls, up₀, up₁)
684
+ for i ∈ parents (ls, up₀, up₁, up₂, up₃ )
681
685
# FIXME ; children also filled in cacheunrolled
682
686
for j ∈ offsets[i]+ 1 : offsets[i+ 1 ] # if parents are expanded, add them all
683
687
opp = ops[j]
@@ -689,7 +693,7 @@ function add_parents_to_op!(
689
693
# Do we want to require that all Δidxs are equal?
690
694
# Because `CartesianIndex((2,3)) - 1` results in a methoderorr, I think this is reasonable for now
691
695
# FIXME ; children also filled in cacheunrolled
692
- for i ∈ parents (ls, up₀, up₁)
696
+ for i ∈ parents (ls, up₀, up₁, up₂, up₃ )
693
697
opp = ops[offsets[i]+ k]
694
698
pushfirst! (vparents, opp)
695
699
push! (children (opp), op)
@@ -710,7 +714,7 @@ function add_parents_to_ops!(ls::LoopSet, ops::Vector{OperationStruct}, constoff
710
714
pushpreamble! (ls, Expr (:(= ), instr. instr, extract_varg (constoffset)))
711
715
end
712
716
elseif ! isloopvalue (op)
713
- add_parents_to_op! (ls, op, ops[i]. parents₀, ops[i]. parents₁, k, Δ)
717
+ add_parents_to_op! (ls, op, ops[i]. parents₀, ops[i]. parents₁, ops[i] . parents₂, ops[i] . parents₃, k, Δ)
714
718
end
715
719
end
716
720
end
0 commit comments