JuliaSIMD / JuliaSIMD/LoopVectorization.jl
For loops with the syntax for i in iter
- Vorherrschende Sprache
- Julia
- Sterne
- 789
- Forks
- 73
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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})
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the @avx loop handling and the canonicalize_range(::Vector{Float64}) failure shown by the MWE. Trace how iterable forms are canonicalized, then verify that the provided mymean example with a Vector completes successfully.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- julia
- Bereich
- performance
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100