class BulkOperationPacked extends BulkOperation
BulkOperation
for PackedInts.Format.PACKED
.Modifier and Type | Field and Description |
---|---|
private int |
bitsPerValue |
private int |
byteBlockCount |
private int |
byteValueCount |
private int |
intMask |
private int |
longBlockCount |
private int |
longValueCount |
private long |
mask |
Constructor and Description |
---|
BulkOperationPacked(int bitsPerValue) |
Modifier and Type | Method and Description |
---|---|
int |
byteBlockCount()
The minimum number of byte blocks to encode in a single iteration, when
using byte encoding.
|
int |
byteValueCount()
The number of values that can be stored in
PackedInts.Decoder.byteBlockCount() byte
blocks. |
void |
decode(byte[] blocks,
int blocksOffset,
int[] values,
int valuesOffset,
int iterations)
Read
8 * iterations * blockCount() blocks from blocks ,
decode them and write iterations * valueCount() values into
values . |
void |
decode(byte[] blocks,
int blocksOffset,
long[] values,
int valuesOffset,
int iterations)
Read
8 * iterations * blockCount() blocks from blocks ,
decode them and write iterations * valueCount() values into
values . |
void |
decode(long[] blocks,
int blocksOffset,
int[] values,
int valuesOffset,
int iterations)
Read
iterations * blockCount() blocks from blocks ,
decode them and write iterations * valueCount() values into
values . |
void |
decode(long[] blocks,
int blocksOffset,
long[] values,
int valuesOffset,
int iterations)
Read
iterations * blockCount() blocks from blocks ,
decode them and write iterations * valueCount() values into
values . |
void |
encode(int[] values,
int valuesOffset,
byte[] blocks,
int blocksOffset,
int iterations)
Read
iterations * valueCount() values from values ,
encode them and write 8 * iterations * blockCount() blocks into
blocks . |
void |
encode(int[] values,
int valuesOffset,
long[] blocks,
int blocksOffset,
int iterations)
Read
iterations * valueCount() values from values ,
encode them and write iterations * blockCount() blocks into
blocks . |
void |
encode(long[] values,
int valuesOffset,
byte[] blocks,
int blocksOffset,
int iterations)
Read
iterations * valueCount() values from values ,
encode them and write 8 * iterations * blockCount() blocks into
blocks . |
void |
encode(long[] values,
int valuesOffset,
long[] blocks,
int blocksOffset,
int iterations)
Read
iterations * valueCount() values from values ,
encode them and write iterations * blockCount() blocks into
blocks . |
int |
longBlockCount()
The minimum number of long blocks to encode in a single iteration, when
using long encoding.
|
int |
longValueCount()
The number of values that can be stored in
PackedInts.Decoder.longBlockCount() long
blocks. |
computeIterations, of, writeLong
private final int bitsPerValue
private final int longBlockCount
private final int longValueCount
private final int byteBlockCount
private final int byteValueCount
private final long mask
private final int intMask
public int longBlockCount()
PackedInts.Decoder
public int longValueCount()
PackedInts.Decoder
PackedInts.Decoder.longBlockCount()
long
blocks.public int byteBlockCount()
PackedInts.Decoder
public int byteValueCount()
PackedInts.Decoder
PackedInts.Decoder.byteBlockCount()
byte
blocks.public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
PackedInts.Decoder
iterations * blockCount()
blocks from blocks
,
decode them and write iterations * valueCount()
values into
values
.blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start reading blocksvalues
- the values buffervaluesOffset
- the offset where to start writing valuesiterations
- controls how much data to decodepublic void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
PackedInts.Decoder
8 * iterations * blockCount()
blocks from blocks
,
decode them and write iterations * valueCount()
values into
values
.blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start reading blocksvalues
- the values buffervaluesOffset
- the offset where to start writing valuesiterations
- controls how much data to decodepublic void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
PackedInts.Decoder
iterations * blockCount()
blocks from blocks
,
decode them and write iterations * valueCount()
values into
values
.blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start reading blocksvalues
- the values buffervaluesOffset
- the offset where to start writing valuesiterations
- controls how much data to decodepublic void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
PackedInts.Decoder
8 * iterations * blockCount()
blocks from blocks
,
decode them and write iterations * valueCount()
values into
values
.blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start reading blocksvalues
- the values buffervaluesOffset
- the offset where to start writing valuesiterations
- controls how much data to decodepublic void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
PackedInts.Encoder
iterations * valueCount()
values from values
,
encode them and write iterations * blockCount()
blocks into
blocks
.values
- the values buffervaluesOffset
- the offset where to start reading valuesblocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksiterations
- controls how much data to encodepublic void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
PackedInts.Encoder
iterations * valueCount()
values from values
,
encode them and write iterations * blockCount()
blocks into
blocks
.values
- the values buffervaluesOffset
- the offset where to start reading valuesblocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksiterations
- controls how much data to encodepublic void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
PackedInts.Encoder
iterations * valueCount()
values from values
,
encode them and write 8 * iterations * blockCount()
blocks into
blocks
.values
- the values buffervaluesOffset
- the offset where to start reading valuesblocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksiterations
- controls how much data to encodepublic void encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
PackedInts.Encoder
iterations * valueCount()
values from values
,
encode them and write 8 * iterations * blockCount()
blocks into
blocks
.values
- the values buffervaluesOffset
- the offset where to start reading valuesblocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksiterations
- controls how much data to encode