Offset bitvectors fail to vectorise
LoopVectorization.check_args returns false for OffsetArray{Bool, BitVector}, but doesn't with the similar OffsetArray{Bool, Vector{Bool}}
Code to reproduce the problem:
using OffsetArrays
using LoopVectorization
OffsetArray(zeros(Bool, 10)) |> LoopVectorization.check_args
OffsetArray(trues(10)) |> LoopVectorization.check_args
Both are expected to return true
It should check the offset, and then do a partial iteration to make it a multiple of 8.
It should check the offset, and then do a partial iteration to make it a multiple of 8.
Any ideas how I might be able to implement this?
I think it'd be a fair bit of work. You could look at https://github.com/JuliaSIMD/LoopVectorization.jl/blob/57c7ffaf56eb3552e5584d9703de9115b9ad65a0/src/codegen/lowering.jl#L288
I am slowly working on replacing this library, but admittedly BitArray support will initially be poor. My point in bringing that up is that further work on LoopVectorization.jl will have a limited lifespan.