JuliaSIMD / JuliaSIMD/LoopVectorization.jl

Doesn't seem to handle Bool negation well

Open
#99 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
789
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Hi, just trying `@avx` for the first time on a simple loop that includes the negation of a boolean:
```
julia> xs = rand(10)

julia> function foo(x)
count = 0
@avx for i in eachindex(x)
count += !isnan(x[i])
end
count
end
foo (generic function with 1 method)

julia> foo(xs)
ERROR: MethodError: no method matching !(::UInt8)
Closest candidates are:
!(::Missing) at missing.jl:100
!(::Bool) at bool.jl:35
!(::Function) at operators.jl:880
...

```
Is that expected?

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.