ForUtil

class ForUtil

Inspired from https://fulmicoton.com/posts/bitpacking/ Encodes multiple integers in one to get SIMD-like speedups. If bitsPerValue <= 8 then we pack 4 ints per Java int else if bitsPerValue <= 16 we pack 2 ints per Java int else we do scalar operations.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun decode(bitsPerValue: Int, pdu: PostingDecodingUtil, ints: IntArray)

Decode 128 integers into ints.

Link copied to clipboard
fun encode(ints: IntArray, bitsPerValue: Int, out: DataOutput)

Encode 128 integers from ints into out.