Open vsbuffalo opened 11 months ago
@vsbuffalo, Great find! It appears we overlooked adding an offset when converting the coitree to an iterator. This issue is present in both aux and neon. I've taken care of it and fixed the bug with commit d4921e04f8efcb09e061ef74bc170cd10e671c86. You can find this fix in one of my ongoing pull requests at https://github.com/dcjones/coitrees/pull/12.
Awesome, thanks @cauliyang!
I was using this library in a project and noticed a subtle potential bug: taking a
Vec<Interval<()>>
and creating bothBasicCOITree
andNeonCOITree
objects, and then iterating over their intervals with.iter()
produces different results. I have created a MRE (mre.rs
)which can be placed in the
examples/
directory and run withcargo run --example mre
to see the behavior. The output I see is:I believe the potential issue could be due to these lines (https://github.com/dcjones/coitrees/blob/main/src/neon.rs#L62-L81). Unfortunately, I do not know enough about targeting these specific architectures to know what is the right way to address this issue and create a pull request. Perhaps these lines are correct, but the iterator for
NeonCOITree
needs to be adapted to output offset intervals.