bp128

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2017 License: AGPL-3.0, Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package bp128 implements SIMD-BP128 integer encoding and decoding. It requires an x86_64/AMD64 CPU that supports SSE2 instructions.

For more details on SIMD-BP128 algorithm see "Decoding billions of integers per second through vectorization" by Daniel Lemire, Leonid Boytsov, and Nathan Kurz at http://arxiv.org/pdf/1209.2137

For the original C++ implementation visit https://github.com/lemire/SIMDCompressionAndIntersection.

Index

Constants

View Source
const (
	// BlockSize is the number of integers per block. Each
	// block address must be aligned at 16-byte boundaries.
	BlockSize = 256
)

Variables

This section is empty.

Functions

func DeltaPack

func DeltaPack(in []uint64) []byte

func DeltaUnpack

func DeltaUnpack(in []byte, out []uint64)

func NumIntegers

func NumIntegers(data []byte) int

Types

type BPackEncoder

type BPackEncoder struct {
	// contains filtered or unexported fields
}

func (*BPackEncoder) Length

func (bp *BPackEncoder) Length() int

func (*BPackEncoder) PackAppend

func (bp *BPackEncoder) PackAppend(in []uint64)

func (*BPackEncoder) Size

func (bp *BPackEncoder) Size() int

func (*BPackEncoder) WriteTo

func (bp *BPackEncoder) WriteTo(in []byte)

type BPackIterator

type BPackIterator struct {
	// contains filtered or unexported fields
}

func (*BPackIterator) AfterUid

func (pi *BPackIterator) AfterUid(uid uint64) (found bool)

func (*BPackIterator) Init

func (pi *BPackIterator) Init(data []byte, afterUid uint64)

func (*BPackIterator) Length

func (pi *BPackIterator) Length() int

func (*BPackIterator) MaxIntInBlock

func (pi *BPackIterator) MaxIntInBlock() uint64

func (*BPackIterator) Next

func (pi *BPackIterator) Next()

func (*BPackIterator) SkipNext

func (pi *BPackIterator) SkipNext()

func (*BPackIterator) StartIdx

func (pi *BPackIterator) StartIdx() int

Returns the startIndex

func (*BPackIterator) Uids

func (pi *BPackIterator) Uids() []uint64

func (*BPackIterator) Valid

func (pi *BPackIterator) Valid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL