JuliaSIMD / JuliaSIMD/LoopVectorization.jl
@turbo with passmissing?
- Dominant language
- Julia
- Stars
- 789
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
I've been using `FastBroadcast` and `@turbo` to speed up broadcasting operations in DataFrames. However, missing values are quite common when you work with a DataFrame, and `@turbo` throws an error in that case.
Is it possible to have something similar to `passmissing` for `@turbo`? This would be consistent with Base broadcast and as FastBroadcast works, which passes missing values when you broadcast.
```julia
using LoopVectorization, FastBroadcast
df = DataFrame(a = [1,missing,3])
@.. df.a .* df.a # this works
@turbo df.a .* df.a # this throws error
```
The error is:
```julia
ERROR: MethodError: no method matching vmaterialize!(::Vector{Union{Missing, Int64}},
::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*),
Tuple{Vector{Union{Missing, Int64}}, Vector{Union{Missing, Int64}}}},
::Val{:Main}, ::Val{(true, 0, 0, 0, true, 0, 32, 15, 64, 0x0000000000000001, 1, true)}, ::Val{((true,), (true,))})
```
The problem persists if you create a view dropping missings, since the vector is still Union{Missing,T} and is not allowed.
Many thanks!!! Great package!!!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.