@@ -557,13 +557,15 @@ childdependencies(ls::LoopSet, os::OperationStruct, expand = false, offset = 0)
557557 parents_symvec (ls, os. childdeps, expand, offset)
558558
559559# 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 )
561561 idxs = Int[]
562+ u₃ == zero (u₃) || loopindex! (idxs, ls, u₃, 0x0010 )
563+ u₂ == zero (u₂) || loopindex! (idxs, ls, u₂, 0x0010 )
562564 u₁ == zero (u₁) || loopindex! (idxs, ls, u₁, 0x0010 )
563565 loopindex! (idxs, ls, u₀, 0x0010 )
564566 reverse! (idxs)
565567end
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₃ )
567569
568570expandedopname (opsymbol:: Symbol , offset:: Integer ) =
569571 Symbol (String (opsymbol) * ' #' * string (offset + 1 ) * ' #' )
@@ -669,6 +671,8 @@ function add_parents_to_op!(
669671 op:: Operation ,
670672 up₀:: UInt128 ,
671673 up₁:: UInt128 ,
674+ up₂:: UInt128 ,
675+ up₃:: UInt128 ,
672676 k:: Int ,
673677 Δ:: Int ,
674678)
@@ -677,7 +681,7 @@ function add_parents_to_op!(
677681 offsets = ls. operation_offsets
678682 if isone (Δ) # not expanded
679683 @assert isone (k)
680- for i ∈ parents (ls, up₀, up₁)
684+ for i ∈ parents (ls, up₀, up₁, up₂, up₃ )
681685 # FIXME ; children also filled in cacheunrolled
682686 for j ∈ offsets[i]+ 1 : offsets[i+ 1 ] # if parents are expanded, add them all
683687 opp = ops[j]
@@ -689,7 +693,7 @@ function add_parents_to_op!(
689693 # Do we want to require that all Δidxs are equal?
690694 # Because `CartesianIndex((2,3)) - 1` results in a methoderorr, I think this is reasonable for now
691695 # FIXME ; children also filled in cacheunrolled
692- for i ∈ parents (ls, up₀, up₁)
696+ for i ∈ parents (ls, up₀, up₁, up₂, up₃ )
693697 opp = ops[offsets[i]+ k]
694698 pushfirst! (vparents, opp)
695699 push! (children (opp), op)
@@ -710,7 +714,7 @@ function add_parents_to_ops!(ls::LoopSet, ops::Vector{OperationStruct}, constoff
710714 pushpreamble! (ls, Expr (:(= ), instr. instr, extract_varg (constoffset)))
711715 end
712716 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, Δ)
714718 end
715719 end
716720 end
0 commit comments