Module org.apache.lucene.core
Package org.apache.lucene.util.packed
Class BulkOperationPackedSingleBlock
java.lang.Object
org.apache.lucene.util.packed.BulkOperation
org.apache.lucene.util.packed.BulkOperationPackedSingleBlock
- All Implemented Interfaces:
PackedInts.Decoder,PackedInts.Encoder
Non-specialized
BulkOperation for PackedInts.Format.PACKED_SINGLE_BLOCK.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final intprivate final longprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intThe minimum number of byte blocks to encode in a single iteration, when using byte encoding.final intThe number of values that can be stored inPackedInts.Decoder.byteBlockCount()byte blocks.voiddecode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) Read8 * iterations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.voiddecode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) Read8 * iterations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.voiddecode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) Readiterations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.voiddecode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) Readiterations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.private intdecode(long block, int[] values, int valuesOffset) private intdecode(long block, long[] values, int valuesOffset) private longencode(int[] values, int valuesOffset) voidencode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) Readiterations * valueCount()values fromvalues, encode them and write8 * iterations * blockCount()blocks intoblocks.voidencode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) Readiterations * valueCount()values fromvalues, encode them and writeiterations * blockCount()blocks intoblocks.private longencode(long[] values, int valuesOffset) voidencode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) Readiterations * valueCount()values fromvalues, encode them and write8 * iterations * blockCount()blocks intoblocks.voidencode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) Readiterations * valueCount()values fromvalues, encode them and writeiterations * blockCount()blocks intoblocks.final intThe minimum number of long blocks to encode in a single iteration, when using long encoding.intThe number of values that can be stored inPackedInts.Decoder.longBlockCount()long blocks.private static longreadLong(byte[] blocks, int blocksOffset) Methods inherited from class org.apache.lucene.util.packed.BulkOperation
computeIterations, of, writeLong
-
Field Details
-
BLOCK_COUNT
private static final int BLOCK_COUNT- See Also:
-
bitsPerValue
private final int bitsPerValue -
valueCount
private final int valueCount -
mask
private final long mask
-
-
Constructor Details
-
BulkOperationPackedSingleBlock
public BulkOperationPackedSingleBlock(int bitsPerValue)
-
-
Method Details
-
longBlockCount
public final int longBlockCount()Description copied from interface:PackedInts.DecoderThe minimum number of long blocks to encode in a single iteration, when using long encoding. -
byteBlockCount
public final int byteBlockCount()Description copied from interface:PackedInts.DecoderThe minimum number of byte blocks to encode in a single iteration, when using byte encoding. -
longValueCount
public int longValueCount()Description copied from interface:PackedInts.DecoderThe number of values that can be stored inPackedInts.Decoder.longBlockCount()long blocks. -
byteValueCount
public final int byteValueCount()Description copied from interface:PackedInts.DecoderThe number of values that can be stored inPackedInts.Decoder.byteBlockCount()byte blocks. -
readLong
private static long readLong(byte[] blocks, int blocksOffset) -
decode
private int decode(long block, long[] values, int valuesOffset) -
decode
private int decode(long block, int[] values, int valuesOffset) -
encode
private long encode(long[] values, int valuesOffset) -
encode
private long encode(int[] values, int valuesOffset) -
decode
public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) Description copied from interface:PackedInts.DecoderReaditerations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.- Parameters:
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 decode
-
decode
public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) Description copied from interface:PackedInts.DecoderRead8 * iterations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.- Parameters:
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 decode
-
decode
public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) Description copied from interface:PackedInts.DecoderReaditerations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.- Parameters:
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 decode
-
decode
public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) Description copied from interface:PackedInts.DecoderRead8 * iterations * blockCount()blocks fromblocks, decode them and writeiterations * valueCount()values intovalues.- Parameters:
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 decode
-
encode
public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) Description copied from interface:PackedInts.EncoderReaditerations * valueCount()values fromvalues, encode them and writeiterations * blockCount()blocks intoblocks.- Parameters:
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
-
encode
public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) Description copied from interface:PackedInts.EncoderReaditerations * valueCount()values fromvalues, encode them and writeiterations * blockCount()blocks intoblocks.- Parameters:
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
-
encode
public void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) Description copied from interface:PackedInts.EncoderReaditerations * valueCount()values fromvalues, encode them and write8 * iterations * blockCount()blocks intoblocks.- Parameters:
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
-
encode
public void encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) Description copied from interface:PackedInts.EncoderReaditerations * valueCount()values fromvalues, encode them and write8 * iterations * blockCount()blocks intoblocks.- Parameters:
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
-