mirror of https://github.com/apache/lucene.git
also gen all other sources from ant target; fixed gen_Packed64SingleBlock.py to match current sources
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1376483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5dc0969da1
commit
3048b635c0
|
@ -76,12 +76,24 @@
|
|||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="createBulkPackedIntSources">
|
||||
<target name="createPackedIntSources">
|
||||
<exec dir="src/java/org/apache/lucene/util/packed"
|
||||
executable="${python.exe}" failonerror="true">
|
||||
<arg value="gen_BulkOperation.py"/>
|
||||
</exec>
|
||||
<fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java" encoding="UTF-8"/>
|
||||
<exec dir="src/java/org/apache/lucene/util/packed"
|
||||
executable="${python.exe}" failonerror="true">
|
||||
<arg value="gen_Direct.py"/>
|
||||
</exec>
|
||||
<exec dir="src/java/org/apache/lucene/util/packed"
|
||||
executable="${python.exe}" failonerror="true">
|
||||
<arg value="gen_Packed64SingleBlock.py"/>
|
||||
</exec>
|
||||
<exec dir="src/java/org/apache/lucene/util/packed"
|
||||
executable="${python.exe}" failonerror="true">
|
||||
<arg value="gen_PackedThreeBlocks.py"/>
|
||||
</exec>
|
||||
<fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java,Direct*.java,Packed64SingleBlock.java,Packed*ThreeBlocks.py" encoding="UTF-8"/>
|
||||
</target>
|
||||
|
||||
<target name="createLevAutomata" depends="check-moman,clone-moman,pull-moman">
|
||||
|
|
|
@ -581,4 +581,4 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,12 +105,12 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
|
||||
// bulk get
|
||||
assert index %% valuesPerBlock == 0;
|
||||
final BulkOperation op = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
|
||||
assert op.blocks() == 1;
|
||||
assert op.values() == valuesPerBlock;
|
||||
final PackedInts.Decoder decoder = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
|
||||
assert decoder.blockCount() == 1;
|
||||
assert decoder.valueCount() == valuesPerBlock;
|
||||
final int blockIndex = index / valuesPerBlock;
|
||||
final int nblocks = (index + len) / valuesPerBlock - blockIndex;
|
||||
op.get(blocks, blockIndex, arr, off, nblocks);
|
||||
decoder.decode(blocks, blockIndex, arr, off, nblocks);
|
||||
final int diff = nblocks * valuesPerBlock;
|
||||
index += diff; len -= diff;
|
||||
|
||||
|
@ -150,11 +150,11 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
// bulk set
|
||||
assert index %% valuesPerBlock == 0;
|
||||
final BulkOperation op = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
|
||||
assert op.blocks() == 1;
|
||||
assert op.values() == valuesPerBlock;
|
||||
assert op.blockCount() == 1;
|
||||
assert op.valueCount() == valuesPerBlock;
|
||||
final int blockIndex = index / valuesPerBlock;
|
||||
final int nblocks = (index + len) / valuesPerBlock - blockIndex;
|
||||
op.set(blocks, blockIndex, arr, off, nblocks);
|
||||
op.encode(arr, off, blocks, blockIndex, nblocks);
|
||||
final int diff = nblocks * valuesPerBlock;
|
||||
index += diff; len -= diff;
|
||||
|
||||
|
|
Loading…
Reference in New Issue