JuliaSIMD / JuliaSIMD/LoopVectorization.jl

For loops with the syntax for i in iter

Open
#231 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
789
Forks
73
PR merge metrics
No merged PRs in 30d

Description

For loops with the syntax `for i in iter` dont work even with a simple iterator like a Vector.
MWE
```julia
using LoopVectorization

test = rand(10000)
function mymean(func,iter)
len = length(iter)
total = zero(eltype(iter))
@avx for i in iter
total += func(i)
end
total/len
end

mymean(identity,test)
```

This gives this error:
```julia
ERROR: LoadError: MethodError: no method matching canonicalize_range(::Vector{Float64})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.