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
Provide instances for bitvec #21
Conversation
How does it look, @newhoggy? |
Sorry, I've been pre-occupied with other things. Looking at this now. |
Do you by any chance know what this comment in the
|
Sure, most of the current incarnation of https://github.com/Bodigrim/bitvec/blob/master/README.md#thread-safety gives a bit more details:
If multiple threads concurrently write neighbouring bits in the same word, they may end up with inconsistent states, effectively losing the work of one of the threads:
In multithreaded enviroment we must ensure that threads access a mutable vector in turns:
|
Thanks for the explanation. |
Would you be able to add property tests to verify that the indexing and endian-ness is the same as rank/select for say |
As mentioned above, I can add the tests (https://github.com/Bodigrim/hw-rankselect-base/commit/b0c6b5c15e0034b4bb9dfa7d83dba921592b7772), but they involve a (rather hastily written) orphan Or I can take a long way and add these instances to |
Please add the instance to |
I have added some tests, please re-review. |
Nice! Thanks! |
Closes #20.
Tests can be found in https://github.com/Bodigrim/hw-rankselect-base/tree/tests, but I do not submit it for merge because of orphan instances.