Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset bitvectors fail to vectorise #465

Open
joshniemela opened this issue Jan 28, 2023 · 3 comments
Open

Offset bitvectors fail to vectorise #465

joshniemela opened this issue Jan 28, 2023 · 3 comments

Comments

@joshniemela
Copy link

joshniemela commented Jan 28, 2023

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

@chriselrod
Copy link
Member

It should check the offset, and then do a partial iteration to make it a multiple of 8.

@joshniemela
Copy link
Author

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?

@chriselrod
Copy link
Member

I think it'd be a fair bit of work.
You could look at

function lower_unrolled_dynamic(

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants