/** * Sole constructor. * @param blockSize the number of values of a single block, must be a multiple of <tt>64</tt> */ public AbstractBlockPackedWriter(DataOutput out, int blockSize) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); reset(out); values = new long[blockSize]; }
AbstractPagedMutable(int bitsPerValue, long size, int pageSize) { this.bitsPerValue = bitsPerValue; this.size = size; pageShift = checkBlockSize(pageSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); pageMask = pageSize - 1; final int numPages = numBlocks(size, pageSize); subMutables = new PackedInts.Mutable[numPages]; }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
Builder(int pageSize, float acceptableOverheadRatio) { pageShift = checkBlockSize(pageSize, MIN_PAGE_SIZE, MAX_PAGE_SIZE); pageMask = pageSize - 1; this.acceptableOverheadRatio = acceptableOverheadRatio; values = new PackedInts.Reader[INITIAL_PAGE_COUNT]; pending = new long[pageSize]; valuesOff = 0; pendingOff = 0; size = 0; ramBytesUsed = baseRamBytesUsed() + RamUsageEstimator.sizeOf(pending) + RamUsageEstimator.shallowSizeOf(values); }
private MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException { this.valueCount = valueCount; blockShift = checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); blockMask = blockSize - 1; final int numBlocks = numBlocks(valueCount, blockSize);
blockShift = checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); blockMask = blockSize - 1; final int numBlocks = numBlocks(valueCount, blockSize);
/** * Sole constructor. * @param blockSize the number of values of a single block, must be a multiple of <tt>64</tt> */ public AbstractBlockPackedWriter(DataOutput out, int blockSize) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); reset(out); values = new long[blockSize]; }
AbstractPagedMutable(int bitsPerValue, long size, int pageSize) { this.bitsPerValue = bitsPerValue; this.size = size; pageShift = checkBlockSize(pageSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); pageMask = pageSize - 1; final int numPages = numBlocks(size, pageSize); subMutables = new PackedInts.Mutable[numPages]; }
/** * Sole constructor. * @param blockSize the number of values of a single block, must be a multiple of <tt>64</tt> */ public AbstractBlockPackedWriter(DataOutput out, int blockSize) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); reset(out); values = new long[blockSize]; }
/** * Sole constructor. * @param blockSize the number of values of a single block, must be a multiple of <tt>64</tt> */ public AbstractBlockPackedWriter(DataOutput out, int blockSize) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); reset(out); values = new long[blockSize]; }
AbstractPagedMutable(int bitsPerValue, long size, int pageSize) { this.bitsPerValue = bitsPerValue; this.size = size; pageShift = checkBlockSize(pageSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); pageMask = pageSize - 1; final int numPages = numBlocks(size, pageSize); subMutables = new PackedInts.Mutable[numPages]; }
AbstractPagedMutable(int bitsPerValue, long size, int pageSize) { this.bitsPerValue = bitsPerValue; this.size = size; pageShift = checkBlockSize(pageSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); pageMask = pageSize - 1; final int numPages = numBlocks(size, pageSize); subMutables = new PackedInts.Mutable[numPages]; }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
Builder(int pageSize, float acceptableOverheadRatio) { pageShift = checkBlockSize(pageSize, MIN_PAGE_SIZE, MAX_PAGE_SIZE); pageMask = pageSize - 1; this.acceptableOverheadRatio = acceptableOverheadRatio; values = new PackedInts.Reader[INITIAL_PAGE_COUNT]; pending = new long[pageSize]; valuesOff = 0; pendingOff = 0; size = 0; ramBytesUsed = baseRamBytesUsed() + RamUsageEstimator.sizeOf(pending) + RamUsageEstimator.shallowSizeOf(values); }
Builder(int pageSize, float acceptableOverheadRatio) { pageShift = checkBlockSize(pageSize, MIN_PAGE_SIZE, MAX_PAGE_SIZE); pageMask = pageSize - 1; this.acceptableOverheadRatio = acceptableOverheadRatio; values = new PackedInts.Reader[INITIAL_PAGE_COUNT]; pending = new long[pageSize]; valuesOff = 0; pendingOff = 0; size = 0; ramBytesUsed = baseRamBytesUsed() + RamUsageEstimator.sizeOf(pending) + RamUsageEstimator.shallowSizeOf(values); }
Builder(int pageSize, float acceptableOverheadRatio) { pageShift = checkBlockSize(pageSize, MIN_PAGE_SIZE, MAX_PAGE_SIZE); pageMask = pageSize - 1; this.acceptableOverheadRatio = acceptableOverheadRatio; values = new PackedInts.Reader[INITIAL_PAGE_COUNT]; pending = new long[pageSize]; valuesOff = 0; pendingOff = 0; size = 0; ramBytesUsed = baseRamBytesUsed() + RamUsageEstimator.sizeOf(pending) + RamUsageEstimator.shallowSizeOf(values); }
private MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException { this.valueCount = valueCount; blockShift = checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); blockMask = blockSize - 1; final int numBlocks = numBlocks(valueCount, blockSize);
blockShift = checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); blockMask = blockSize - 1; final int numBlocks = numBlocks(valueCount, blockSize);