Skip to content

Commit c4b3c7c

Browse files
committed
Replace a couple equalities with inequalities
1 parent 713e97e commit c4b3c7c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/closeopen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ end
1616
@inline Base.length(r::CloseOpen{Zero}) = r.upper
1717

1818
@inline Base.iterate(r::CloseOpen) = (i = Int(first(r)); (i, i))
19-
@inline Base.iterate(r::CloseOpen, i::Int) = (i += 1) == r.upper ? nothing : (i, i)
19+
@inline Base.iterate(r::CloseOpen, i::Int) = (i += 1) r.upper ? nothing : (i, i)
2020

2121
ArrayInterface.known_first(::Type{<:CloseOpen{StaticInt{F}}}) where {F} = F
2222
ArrayInterface.known_step(::Type{<:CloseOpen}) = 1

src/lowering.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,7 @@ function lower_unrolled_dynamic(ls::LoopSet, us::UnrollSpecification, n::Int, in
385385
body = lower_block(ls, us, n, inclmask, UF)
386386
if loopisstatic
387387
iters = length(loop) ÷ UFW
388-
# @show loop iters*UF, allinteriorunrolled(ls, us, n)# Let's set a limit on total unrolling
389-
if isone(iters) || (iters*UF 16 && allinteriorunrolled(ls, us, n))# Let's set a limit on total unrolling
388+
if (iters 1) || (iters*UF 16 && allinteriorunrolled(ls, us, n))# Let's set a limit on total unrolling
390389
q = Expr(:block)
391390
foreach(_ -> push!(q.args, body), 1:iters)
392391
else

0 commit comments

Comments
 (0)