final class BulkOperationPackedSingleBlock extends BulkOperation
BulkOperation
for PackedInts.Format.PACKED_SINGLE_BLOCK
.Modifier and Type | Field and Description |
---|---|
private int |
bitsPerValue |
private static int |
BLOCK_COUNT |
private long |
mask |
private int |
valueCount |
Constructor and Description |
---|
BulkOperationPackedSingleBlock(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 . |
private int |
decode(long block,
int[] values,
int valuesOffset) |
private int |
decode(long block,
long[] values,
int valuesOffset) |
private long |
encode(int[] values,
int valuesOffset) |
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 . |
private long |
encode(long[] values,
int valuesOffset) |
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. |
private static long |
readLong(byte[] blocks,
int blocksOffset) |
computeIterations, of, writeLong
private static final int BLOCK_COUNT
private final int bitsPerValue
private final int valueCount
private final long mask
public BulkOperationPackedSingleBlock(int bitsPerValue)
public final int longBlockCount()
PackedInts.Decoder
public final int byteBlockCount()
PackedInts.Decoder
public int longValueCount()
PackedInts.Decoder
PackedInts.Decoder.longBlockCount()
long
blocks.public final int byteValueCount()
PackedInts.Decoder
PackedInts.Decoder.byteBlockCount()
byte
blocks.private static long readLong(byte[] blocks, int blocksOffset)
private int decode(long block, long[] values, int valuesOffset)
private int decode(long block, int[] values, int valuesOffset)
private long encode(long[] values, int valuesOffset)
private long encode(int[] values, int valuesOffset)
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