Documentation ¶
Overview ¶
Package bmi contains helpers for manipulating bitmaps via BMI2 extensions properly falling back to pure go implementations if the CPU doesn't support BMI2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBits ¶
ExtractBits performs a Parallel Bit extract as per the PEXT instruction for x86/x86-64 cpus to use the second parameter as a mask to extract the bits from the first argument into a new bitmap.
For each bit Set in selectBitmap, the corresponding bits are extracted from bitmap and written to contiguous lower bits of the result, the remaining upper bits are zeroed.
func GreaterThanBitmap ¶
GreaterThanBitmap builds a bitmap where each bit corresponds to whether or not the level in that index is greater than the value of rhs.
Types ¶
This section is empty.