Skip to content

Commit

Permalink
Vectorize @ inbounds for x in A ...
Browse files Browse the repository at this point in the history
This would previously have been an infinite loop if
`length(A) == typemax(Int)` so the loop vectorizer couldn't compute a
trip count.
  • Loading branch information
simonster committed Nov 3, 2015
1 parent 99dc2eb commit fa89a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ collect(itr) = collect(eltype(itr), itr)
## Iteration ##
start(A::Array) = 1
next(a::Array,i) = (a[i],i+1)
done(a::Array,i) = (i > length(a))
done(a::Array,i) = i == length(a)+1

## Indexing: getindex ##

Expand Down

0 comments on commit fa89a6e

Please sign in to comment.