Skip to content

Commit da994e7

Browse files
committed
Ensuring unrolling factors are an integer multiple of the unrolling step.
1 parent 4a07d5d commit da994e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/determinestrategy.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ function solve_unroll(X, R, u₁L, u₂L, u₁step, u₂step)
398398
u₁high = solve_unroll_constT(R, u₂low) + u₁step
399399
u₂high = solve_unroll_constU(R, u₁low) + u₂step
400400
maxunroll = REGISTER_COUNT == 32 ? (((X₂ > 0) & (X₃ > 0)) ? 10 : 8) : 6
401-
u₁low = min(u₁low, maxunroll)
402-
u₂low = min(u₂low, maxunroll)
401+
u₁low = (min(u₁low, maxunroll) ÷ u₁step) * u₁step
402+
u₂low = (min(u₂low, maxunroll) ÷ u₂step) * u₂step
403403
u₁high = min(u₁high, maxunroll)
404404
u₂high = min(u₂high, maxunroll)
405-
solve_unroll_iter(X, R, u₁L, u₂L, u₁high:-u₁step:u₁low, u₂high:-u₂step:u₂low)
405+
solve_unroll_iter(X, R, u₁L, u₂L, reverse(u₁low:u₁step:u₁high), reverse(u₂low:u₂step:u₂high))
406406
end
407407

408408
function solve_unroll_constU(R::AbstractVector, u₁::Int)

0 commit comments

Comments
 (0)