-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
using LoopVectorization
function f(a)
s = 0.0
@avx for i in eachindex(a)
s += a[i]
end
s
end
julia> f([1,2,3])
6.0
julia> f(1:3)
StackOverflowError:
Stacktrace:
[1] stridedpointer(::UnitRange{Int64}) at /Users/mason/.julia/packages/VectorizationBase/yJngh/src/vectorizable.jl:389 (repeats 80000 times)
I think this should be supportable. One (dumb) way to make this work would just be
VectorizationBase.stridedpointer(r::AbstractRange) = VectorizationBase.stridedpointer(collect(r))
but I wonder if there's a way we can do it that doesn't require explicitly materializing the range. Maybe this issue should be moved to VectorizationBase though,
Metadata
Metadata
Assignees
Labels
No labels