lemire/FastPFor

Packing 2 bits into a large data type(INT64)

Darshvino opened this issue · 3 comments

Hi @lemire,

I was the one to ask you for the reference for packing 2 bits into a larger data type yesterday.

Basically, what is the difference between SIMDcomp and FastPFor? And for the 2 bits of packing and unpacking which library can be used among the two?

Thanks

Basically what I want to do is, I have 2-bit values in int64:
something like this: 000000.........0000011, 000000.........0000010, 000000.........0000001,....... these are INT64 values.

I want to pack 32 2-bit values in one int64 value.

Example:

A = 0000.........10(64 bit), B = 0000........11(64 bit), C = 0000........01, and so on, these are int64 values containing 2-bit values.

Z = 101101...........(int64 value, containing packed values of A, B, C, D, .............. )

If you could help me to find the reference in your libraries, that would be great!

Thanks in advance

The question is not in reference to the library.

You appear to have a programming question. That is better taken to sites like stackoverflow. Please do not create issues in software libraries for library maintainers to address.

If you open an issue with a library, it should bear on the library. Do not raise generic programming questions.