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 c3a8aed commit 1d34c07Copy full SHA for 1d34c07
src/systems/alias_elimination.jl
@@ -179,7 +179,10 @@ struct AliasGraphKeySet <: AbstractSet{Int}
179
end
180
Base.keys(ag::AliasGraph) = AliasGraphKeySet(ag)
181
Base.iterate(agk::AliasGraphKeySet, state...) = Base.iterate(agk.ag.eliminated, state...)
182
-Base.in(i::Int, agk::AliasGraphKeySet) = agk.ag.aliasto[i] !== nothing
+function Base.in(i::Int, agk::AliasGraphKeySet)
183
+ aliasto = agk.ag.aliasto
184
+ 1 <= i <= length(aliasto) && aliasto[i] !== nothing
185
+end
186
187
count_nonzeros(a::AbstractArray) = count(!iszero, a)
188
0 commit comments