JuliaSIMD / JuliaSIMD/LoopVectorization.jl
Cannot vectorize a loop with inner hidden loop (findfirst)
Open
- Dominant language
- Julia
- Stars
- 789
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
I have a simple algorithm that I want to vectorize. Works with `@simd` but for `@avx` throws an error that x is not defined.
```julia
function check_simd(regex_list, input)
input_len=length(input)
icon_indices = Vector{Int64}(undef, input_len)
@avx for j=1:input_len
icon_indices[j] = findfirst(x-> match(x, input[j]) !== nothing, regex_list)
end
return icon_indices
end
```
MWE here: https://gist.github.com/aminya/4b6e6db1147e63727cffc781633a8e0b
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.