Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduction not Found Error in branching loop #90

Closed
MasonProtter opened this issue Apr 7, 2020 · 1 comment
Closed

Reduction not Found Error in branching loop #90

MasonProtter opened this issue Apr 7, 2020 · 1 comment

Comments

@MasonProtter
Copy link
Contributor

julia> using LoopVectorization

julia> foo!(p::Vector{Float64}) = @avx for i  eachindex(p)
           p[i] = p[i] < 0.5 ? p[i]^2 : p[i]^3
       end
ERROR: LoadError: "Reduction not found."
Stacktrace:
 [1] reduction_zero at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/costs.jl:297 [inlined]
 [2] add_reduction_update_parent!(::Array{LoopVectorization.Operation,1}, ::Array{Symbol,1}, ::Array{Symbol,1}, ::LoopVectorization.LoopSet, ::LoopVectorization.Operation, ::Symbol, ::Int64, ::Int64) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/add_compute.jl:124
 [3] add_compute!(::LoopVectorization.LoopSet, ::Symbol, ::Expr, ::Int64, ::Int64, ::LoopVectorization.ArrayReferenceMetaPosition) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/add_compute.jl:239
 [4] add_operation!(::LoopVectorization.LoopSet, ::Symbol, ::Expr, ::LoopVectorization.ArrayReferenceMetaPosition, ::Int64, ::Int64) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/graphs.jl:496
 [5] add_if!(::LoopVectorization.LoopSet, ::Symbol, ::Expr, ::Int64, ::Int64, ::LoopVectorization.ArrayReferenceMetaPosition) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/add_ifelse.jl:14
 [6] add_operation!(::LoopVectorization.LoopSet, ::Symbol, ::Expr, ::LoopVectorization.ArrayReferenceMetaPosition, ::Int64, ::Int64) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/graphs.jl:499
 [7] push!(::LoopVectorization.LoopSet, ::Expr, ::Int64, ::Int64) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/graphs.jl:534
 [8] add_block!(::LoopVectorization.LoopSet, ::Expr, ::Int64, ::Int64) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/graphs.jl:336
 [9] add_loop!(::LoopVectorization.LoopSet, ::Expr, ::Int64) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/graphs.jl:439
 [10] copyto! at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/constructors.jl:6 [inlined]
 [11] LoopVectorization.LoopSet(::Expr, ::Symbol) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/constructors.jl:52
 [12] LoopVectorization.LoopSet(::Expr, ::Module) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/constructors.jl:56
 [13] @avx(::LineNumberNode, ::Module, ::Any) at /home/mason/.julia/packages/LoopVectorization/zXjmq/src/constructors.jl:97
in expression starting at REPL[13]:1
@chriselrod
Copy link
Member

Fixed by 1f711ed. Added to the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants