-
Notifications
You must be signed in to change notification settings - Fork 53
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
Packing 2 bits values into a bigger #24
Comments
Please refer to our documentation and examples… You can pack 2-bit values using the simdcomp library as follows: I believe that we provide references, see our README. If you encounter issues using simdcomp, please start by describing the work you have and be specific on the issue. |
Hi @lemire, Thanks a lot for your reply. I think this will be the main reference for 2 bits packing: https://github.com/lemire/simdcomp/blob/631f8a7a27cb3398be275f0144ab9133d0a2ea4c/src/simdbitpacking.c#L113 1.) Whether there is an implementation with an AVX2 instruction set(like using 256-bit registers)? 2.) And the input is the unpacked value(A = 0000.........10(64 bit), B = 0000........11(64 bit), C = 0000........01, and so on) and the output is the packed value(Z = 101101...........(int64 value, containing packed values of A, B, C, D, .............. ), is this right with the above implementation? Thanks |
Please refer to the papers, e.g.,
|
Thank you a lot @lemire. I will refer to the above references |
Hi @lemire, I interpreted the implementation of 2-bit packing using What I found wrt packing is: If I have an Input array something like this: (3,2,1,3,1,3,2,0,1,1,2,3,2,3,3,2,0,2,0,0.....) each is of type int32 -> And then the packing will not happen serially, instead it happens something like this: What I mean to say is that the values in the packed data are not serial like the original. It would be great if you can add few comments on this and give clarification on the way the data is being packed. Thanks, |
Hi @lemire,
Thank you for all your work and all the resources you had provided.
Is there any reference to efficiently pack the 2 bits into a larger data type(basically int64)?
A = 0000.........10(64 bit), B = 0000........11(64 bit), C = 0000........01, and so on, these are int64 values containing 2-bit values.
So, I want to pack them in an int64 datatype(32 2-bit values)
Z = 101101...........(int64 value, containing packed values of A, B, C, D, .............. )
I want to perform this efficiently. So It would be helpful if you can help me with some references.
Thanks in advance!
The text was updated successfully, but these errors were encountered: