We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
x in AliasGraphKeySet
1 parent 0c6e5c9 commit 8e7384cCopy full SHA for 8e7384c
src/systems/alias_elimination.jl
@@ -181,7 +181,10 @@ struct AliasGraphKeySet <: AbstractSet{Int}
181
end
182
Base.keys(ag::AliasGraph) = AliasGraphKeySet(ag)
183
Base.iterate(agk::AliasGraphKeySet, state...) = Base.iterate(agk.ag.eliminated, state...)
184
-Base.in(i::Int, agk::AliasGraphKeySet) = agk.ag.aliasto[i] !== nothing
+function Base.in(i::Int, agk::AliasGraphKeySet)
185
+ aliasto = agk.ag.aliasto
186
+ 1 <= i <= length(aliasto) && aliasto[i] !== nothing
187
+end
188
189
count_nonzeros(a::AbstractArray) = count(!iszero, a)
190
0 commit comments