package bmi

import "github.com/apache/arrow/go/v10/parquet/internal/bmi"

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

Functions

func ExtractBits

func ExtractBits(bitmap, selectBitmap uint64) uint64

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

func GreaterThanBitmap(levels []int16, rhs int16) uint64

GreaterThanBitmap builds a bitmap where each bit corresponds to whether or not the level in that index is greater than the value of rhs.

Source Files

bitmap_bmi2_amd64.go bmi.go bmi_amd64.go

Version
v10.0.1 (latest)
Published
Nov 15, 2022
Platform
linux/amd64
Imports
3 packages
Last checked
13 hours ago

Tools for package owners.