We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
local
@turbo
$ julia -O3 --min-optlevel=3 -g 2 --threads 4 _ _ _ _(_)_ | Documentation: https://docs.julialang.org (_) | (_) (_) | _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 1.8.0 (2022-08-17) _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release |__/ | julia> using LoopVectorization julia> function myminmax(x) a = b = first(x) for i in eachindex(x) local e = x[i] b = max(b, e) a = min(a, e) end a, b end myminmax (generic function with 1 method) julia> function myminmax_turbo(x) a = b = first(x) @turbo for i in eachindex(x) local e = x[i] b = max(b, e) a = min(a, e) end a, b end ERROR: LoadError: Don't know how to handle expression. x[i] Stacktrace: [1] push!(ls::LoopVectorization.LoopSet, ex::Expr, elementbytes::Int64, position::Int64, mpref::Nothing) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/modeling/graphs.jl:1657 [2] push!(ls::LoopVectorization.LoopSet, ex::Expr, elementbytes::Int64, position::Int64, mpref::Nothing) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/modeling/graphs.jl:1650 [3] push!(ls::LoopVectorization.LoopSet, ex::Expr, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/modeling/graphs.jl:1617 [4] add_block! @ ~/.julia/packages/LoopVectorization/aw6pf/src/modeling/graphs.jl:927 [inlined] [5] add_loop!(ls::LoopVectorization.LoopSet, q::Expr, elementbytes::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/modeling/graphs.jl:1264 [6] copyto! @ ~/.julia/packages/LoopVectorization/aw6pf/src/constructors.jl:15 [inlined] [7] LoopVectorization.LoopSet(q::Expr, mod::Symbol) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/constructors.jl:84 [8] LoopVectorization.LoopSet(q::Expr, m::Module) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/constructors.jl:88 [9] turbo_macro(::Module, ::LineNumberNode, ::Expr) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/constructors.jl:227 [10] var"@turbo"(__source__::LineNumberNode, __module__::Module, args::Vararg{Any}) @ LoopVectorization ~/.julia/packages/LoopVectorization/aw6pf/src/constructors.jl:330 in expression starting at REPL[3]:3
The text was updated successfully, but these errors were encountered:
b13e9ee
No branches or pull requests
The text was updated successfully, but these errors were encountered: