-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Description
In the example of this thread, LoopVectorization seems not to be working for powers? Simpler examples:
julia> rr = rand(5);
julia> @avx rr.^2
ERROR: syntax: SSAValue objects should not occur in an AST
Stacktrace:
[1] top-level scope at REPL[7]:1
julia> function sqr(x)
out = similar(x)
@avx for i in eachindex(x)
out[i] = x[i]^2
end
out
end
sqr (generic function with 1 method)
julia> sqr(rr)
ERROR: MethodError: no method matching ^(::VectorizationBase.SVec{4,Float64}, ::Int64)
Closest candidates are:
^(::Missing, ::Integer) at missing.jl:155
^(::Missing, ::Number) at missing.jl:115
^(::BigFloat, ::Union{Int16, Int32, Int64, Int8}) at mpfr.jl:587
...
Stacktrace:
[1] macro expansion at /Users/me/.julia/packages/LoopVectorization/pVDc9/src/reconstruct_loopset.jl:415 [inlined]
[2] _avx_! at /Users/me/.julia/packages/LoopVectorization/pVDc9/src/reconstruct_loopset.jl:415 [inlined]
[3] sqr(::Array{Float64,1}) at ./REPL[8]:3
[4] top-level scope at REPL[9]:1
(sdkfjhsdsdf) pkg> st
Status `~/trash/sdkfjhsdsdf/Project.toml`
bdcacae8 LoopVectorization v0.6.27
julia> VERSION # yesterday's, but I get the same on 1.4, just slightly more verbose errors
v"1.5.0-DEV.570"Metadata
Metadata
Assignees
Labels
No labels