-
Notifications
You must be signed in to change notification settings - Fork 124
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
You tried to apply Simple16 to an incompatible set of integers #51
Comments
This should be better documented, but it should be clear from the code: if ((*in >> 28) > 0) {
std::cerr << "Input's out of range: " << *in << std::endl;
throw std::runtime_error(
"You tried to apply Simple16 to an incompatible set of integers.");
} Integers are expected to be in [0, 2^28). |
Can you open issues with each bug you have found with a reproducing test case? Ideally, please consider issue pull requests to fix the issues you have found. |
Fixed as per... Regarding other issues you allude to, please open separate issues and provide reproducible test cases and/or factual analysis to describe the problem. |
If all these simpleNN codecs fail because the inpunt numbers have different range, then this part is cleared. |
Sure... I trust that the issues you found are real. I am just inviting you to open distinct issues... (otherwise it is hard to keep track of what is what). |
I tried to debug and it's not conclusive, I didn't see memory access issues. Without __restrict I didn't get any reported issues though, so hard to even report anything as __restrict isn't used on VS anyways. |
Just wanted to let you know that results that I got from Overall, awesome! |
Well, it is not a hidden requirement: |
If you go through the factory call, then you should be fine... IntegerCODEC &codec = *CODECFactory::getFromName("simdfastpfor128"); |
... because the factory wraps the codec. |
Yes, I use it through the wrapper (but not through the codec factory, as I don't want to pull in all other codecs into my binary because of that map). I use When I diff them, I get almost identical memory contents, except there is one zero inserted and second number differ by 1: So, the contents compressed with simdfastpfor128 already contains size as part of the compressed data? This is the test that I'm trying to use: https://gist.github.com/pps83/1fbeed8ec599861075d7b7de7fe1ed9f In my case I encode blocks of 2731 ints, then encode and store these blocks. When I read them back I decode them. So far, encoding fails because it seems that not only that it expects alignegment, but also produces different output depending on input alignment. |
You are correct. There are leftover implicit alignment restrictions. We removed them in follow-up work, but they were never lifted in this library... see... Pull requests are invited to solve this issue.
They are definitively sensitive to alignment. In fact, it is even documented in the code that you are responsible to maintain alignment prior to decoding. Obviously, this is not desirable and should be fixed. Please see the issue I just created. |
https://github.com/lemire/FastPFor/blob/71d54a9793245ae90e69c86a425d4ee1ee6543d8/headers/simple16.h#L377
so, there is that exception, but no explanation at all what Simple16 considers incompatible.
Also, many codecs are plainly broken, read/write random memory or crash. These are buggy/broken: simple16, simple8b_rle, simple9, simple9_rle, vsencoding, simdfastpfor256, fastpfor128, fastpfor256, simdfastpfor128 (the last for read random memory here and there).
The text was updated successfully, but these errors were encountered: